CLI: Persist hazards in royale games.
This commit is contained in:
parent
0331ea65f8
commit
d42f5f46cc
1 changed files with 7 additions and 0 deletions
|
|
@ -144,6 +144,13 @@ var run = func(cmd *cobra.Command, args []string) {
|
|||
Turn++
|
||||
ruleset = getRuleset(Seed, Turn, snakes)
|
||||
state = createNextBoardState(ruleset, state, outOfBounds, snakes)
|
||||
|
||||
// This is a massive hack to make Battle Royale rules work...
|
||||
royaleRuleset, ok := ruleset.(*rules.RoyaleRuleset)
|
||||
if ok {
|
||||
outOfBounds = append([]rules.Point{}, royaleRuleset.OutOfBounds...)
|
||||
}
|
||||
|
||||
if ViewMap {
|
||||
printMap(state, outOfBounds, Turn)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue