ChessBoardController class

Controller for programmatically controlling the board

Constructors

ChessBoardController()

Properties

game ↔ Chess
The game attached to the controller
read / write
refreshBoard ↔ Function
Function from the ScopedModel to refresh board
read / write
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clearBoard() → void
Clears board
loadPGN(String pgn) → void
Loads a PGN
makeMove(String from, String to) → void
Makes move on the board
makeMoveWithPromotion(String from, String to, String pieceToPromoteTo) → void
Makes move and promotes pawn to piece (from is a square like d4, to is also a square like e3, pieceToPromoteTo is a String like "Q". pieceToPromoteTo String will be changed to enum in a future update and this method will be deprecated in the future
putPiece(PieceType piece, String square, PieceColor color) → void
Puts piece on a square
resetBoard() → void
Resets square
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
@pragma("vm:entry-point"), inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited