Class HtmlDisplay


  • public class HtmlDisplay
    extends Object
    Drawing boards in HTML. Buttons: with some inspiration from https://stackoverflow.com/questions/63846699/how-do-i-keep-the-selected-button-highlighted

    For the buttons etc to work correctly, the HTML page into which this code is included should also include the JS snippet from js/boardDisplay.js

    • Constructor Detail

      • HtmlDisplay

        public HtmlDisplay()
    • Method Detail

      • htmlDisplay

        public static String htmlDisplay​(Vector<Piece> pieces,
                                         Episode.Pick lastMove,
                                         boolean weShowAllMovables,
                                         boolean[] isJMoveable,
                                         int cellWidth,
                                         boolean canMove)
        Parameters:
        pieces - A dense array with no nulls, like Board.values
        canMove - If true, the player can make a move, so buttons will be enabled
      • notation

        public static String notation​(boolean weShowAllMovables)