DEV 1303: Add empty and royale maps and update game map interface (#72)
* move random generator into Settings * add empty and royale maps * place snakes on either cardinal or corner positions first
This commit is contained in:
parent
6fa2da2f01
commit
e94d758a9b
12 changed files with 479 additions and 52 deletions
|
|
@ -13,7 +13,7 @@ func SetupBoard(mapID string, settings rules.Settings, width, height int, snakeI
|
|||
return nil, err
|
||||
}
|
||||
|
||||
editor := NewBoardStateEditor(boardState, settings.Rand())
|
||||
editor := NewBoardStateEditor(boardState)
|
||||
|
||||
err = gameMap.SetupBoard(boardState, settings, editor)
|
||||
if err != nil {
|
||||
|
|
@ -31,7 +31,7 @@ func UpdateBoard(mapID string, previousBoardState *rules.BoardState, settings ru
|
|||
}
|
||||
|
||||
nextBoardState := previousBoardState.Clone()
|
||||
editor := NewBoardStateEditor(nextBoardState, settings.Rand())
|
||||
editor := NewBoardStateEditor(nextBoardState)
|
||||
|
||||
err = gameMap.UpdateBoard(previousBoardState, settings, editor)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue