"Feast" -> "Maze". Fix backfill bug. (#26)

This commit is contained in:
Brad Van Vugt 2020-12-08 13:20:13 -08:00 committed by GitHub
parent d7ee7b97fb
commit e01a1bf505
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 86 additions and 13 deletions

View file

@ -548,6 +548,9 @@ func (r *StandardRuleset) getUnoccupiedPoints(b *BoardState, includePossibleMove
pointIsOccupied[p.X][p.Y] = true
}
for _, snake := range b.Snakes {
if snake.EliminatedCause != NotEliminated {
continue
}
for i, p := range snake.Body {
if _, xExists := pointIsOccupied[p.X]; !xExists {
pointIsOccupied[p.X] = map[int32]bool{}