-
-
Save morintd/74deed0f78ccb88678e9b576ebeaa0ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export namespace GameDomainModel { | |
export enum Square { | |
X = "X", | |
O = "O", | |
Empty = "", | |
} | |
export type Squares = [ | |
Square, | |
Square, | |
Square, | |
Square, | |
Square, | |
Square, | |
Square, | |
Square, | |
Square | |
]; | |
export type Board = { | |
squares: Squares; | |
}; | |
export type Player = Square.X | Square.O; | |
export type Winner = Player | null | "draw"; | |
export type GameState = { | |
winner: Winner; | |
history: Squares[]; | |
xIsNext: boolean; | |
step: number; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment