Package edu.wisc.game.sql
Class HtmlDisplay
- java.lang.Object
-
- edu.wisc.game.sql.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-highlightedFor 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 Summary
Constructors Constructor Description HtmlDisplay()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
htmlDisplay(Vector<Piece> pieces, Episode.Pick lastMove, boolean weShowAllMovables, boolean[] isJMoveable, int cellWidth, boolean canMove)
static String
notation(boolean weShowAllMovables)
-
-
-
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.valuescanMove
- If true, the player can make a move, so buttons will be enabled
-
notation
public static String notation(boolean weShowAllMovables)
-
-