Rename "EliminatedByStarvation" > "EliminatedByOutOfHealth"
This commit is contained in:
parent
92592c2aba
commit
f5aec61e04
5 changed files with 27 additions and 25 deletions
|
|
@ -108,9 +108,11 @@ func (r *RoyaleRuleset) damageOutOfBounds(b *BoardState) error {
|
|||
if head == p {
|
||||
// Snake is now out of bounds, reduce health
|
||||
snake.Health = snake.Health - r.DamagePerTurn
|
||||
if snake.Health <= 0 {
|
||||
if snake.Health < 0 {
|
||||
snake.Health = 0
|
||||
snake.EliminatedCause = EliminatedByStarvation
|
||||
}
|
||||
if r.StandardRuleset.snakeIsOutOfHealth(snake) {
|
||||
snake.EliminatedCause = EliminatedByOutOfHealth
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue