Add game over detection to each ruleset.
This commit is contained in:
parent
44b6b94666
commit
71fc6bf503
5 changed files with 150 additions and 2 deletions
|
|
@ -35,4 +35,5 @@ type SnakeMove struct {
|
|||
type Ruleset interface {
|
||||
CreateInitialBoardState(width int32, height int32, snakeIDs []string) (*BoardState, error)
|
||||
CreateNextBoardState(prevState *BoardState, moves []SnakeMove) (*BoardState, error)
|
||||
IsGameFinished(state *BoardState) (bool, error)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue