Board

Utilities View source
Board
public class Board

This Board library allows you to create a simple multi board with dynamic cell values.

  1. Create a board let board = new Board("myBoard", 0.02)

  2. Define columns. The second parameter is width relative to board width. board.columns(asList(new BoardColumn("Player", 0.7), new BoardColumn(COLOR_GOLD.toColorString() + "Kills", 0.3)))

  3. Add rows and cells let killcount = dynamicCell<int>(0, i -> i.toString()) board.addRow() ..addCell("My Name") ..addDynamic(killcount)

  4. Show board board.show()

  5. Update dynamic value killcount.updateValue(killcount.value + 1)

Constructors

construct(string title, real width)

Create a board with a title and width. Width being in the range [0;1] percentage of screen space.

Methods

columns(LinkedList<BoardColumn> columns)

Initialize the boards columns

addRow() returns BoardRow

Add a new row to the board

show()

Show the board to players

removeRow(BoardRow row)

Remove a row from the board, e.g. when a player leaves

getBoard() returns multiboard

Unsafe access to the underlying multiboard