Add game over detection to each ruleset.

This commit is contained in:
Brad Van Vugt 2020-05-17 14:22:09 -07:00
parent 44b6b94666
commit 71fc6bf503
5 changed files with 150 additions and 2 deletions

View file

@ -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)
}