TicTacToeGame class
- Annotations
-
- @freezed
Constructors
-
TicTacToeGame({required IList<
int?> board, required int currentPlayer, @Default.new('tictactoe') String type}) -
constfactory
-
TicTacToeGame.fromJson(Map<
String, dynamic> map) -
factory
Properties
-
availableLocations
→ IList<
int> -
no setter
-
board
→ IList<
int?> -
no setterinherited
-
copyWith
→ $TicTacToeGameCopyWith<
TicTacToeGame> -
no setterinherited
- currentPlayer → int
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- roundOver → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
no setterinherited
- winner → Winner?
-
no setter
Methods
-
canMove(
int player, int location) → bool -
gameOver(
GenericGame g) → bool -
isLoser(
int player) → bool -
isWinner(
int player) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
winningLocationCombinations
↔ IList<
IList< int> > -
getter/setter pair