ChessboardController class Null safety

Inheritance

Constructors

ChessboardController({MoveCallback? onMove, CheckMateCallback? onCheckMate, CheckCallback? onCheck, DrawCallback? onDraw, bool enablePlay = true, Chess? chessjsGame})

Properties

enablePlay bool
User moves can be enabled or disabled by this property
read / write
gameLogic Chess
Creates a logical chess game
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
hasListeners bool
Whether any listeners are currently registered. [...]
@protected, read-only, inherited
onCheck CheckCallback?
Callback for when a player is in check
read / write
onCheckMate CheckMateCallback?
Callback for when a player is checkmated
read / write
onDraw DrawCallback?
Callback for when the game is a draw (Example: K v K)
read / write
onMove MoveCallback?
Callback for when a move is made
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes. [...]
inherited
disableUserMoves() → void
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener and removeListener will throw after the object is disposed). [...]
@mustCallSuper, inherited
enableUserMove() → void
getSanHistory() List<String>
TODO make select a move possible in the notation Implement how to iterate over lines. Also create functions to display in the board the state after selecting a move from notation. The PROBLEM -> we are displaying the state of the board based on the last state of the history. In the buildBoard function the controller is passed to each BoardSquare and the board variable of gameLogic tells whether a piece in on the square Get history of game (moves) in SAN format Returns a List
getVerboseHistory() List<Map>
Get history of game (moves) with details for each move. Returns a List
makeMove(String move) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notifyListeners() → void
Call all the registered listeners. [...]
refreshBoard() → void
Refreshes board
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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