GameData constructor
GameData(- String id,
- dynamic lightPlayer,
- dynamic darkPlayer,
- String board,
- dynamic moves,
- int tInitial,
- int tIncrement,
- int tLightTimer,
- int tDarkTimer,
- String gameType,
- String createdAt,
- String updatedAt
)
Implementation
GameData(
this.id,
var lightPlayer,
var darkPlayer,
this.board,
var moves,
this.tInitial,
this.tIncrement,
this.tLightTimer,
this.tDarkTimer,
this.gameType,
this.createdAt,
this.updatedAt) {
for (var i in moves) {
this.moves.add(i);
}
this.lightPlayer = lightPlayer ?? "AI";
this.darkPlayer = darkPlayer ?? "AI";
winner = "";
endState = "";
}