new cause of death by hazard (#104)
This commit is contained in:
parent
b1ddd2f4ca
commit
7d769b01b6
3 changed files with 11 additions and 10 deletions
|
|
@ -1299,7 +1299,7 @@ func TestMaybeDamageHazards(t *testing.T) {
|
|||
{
|
||||
Snakes: []Snake{{Body: []Point{{0, 0}}}},
|
||||
Hazards: []Point{{0, 0}},
|
||||
ExpectedEliminatedCauses: []string{EliminatedByOutOfHealth},
|
||||
ExpectedEliminatedCauses: []string{EliminatedByHazard},
|
||||
ExpectedEliminatedByIDs: []string{""},
|
||||
ExpectedEliminatedOnTurns: []int{42},
|
||||
},
|
||||
|
|
@ -1334,7 +1334,7 @@ func TestMaybeDamageHazards(t *testing.T) {
|
|||
{Body: []Point{{3, 3}, {3, 4}, {3, 5}, {3, 6}}},
|
||||
},
|
||||
Hazards: []Point{{3, 3}},
|
||||
ExpectedEliminatedCauses: []string{NotEliminated, EliminatedByOutOfHealth},
|
||||
ExpectedEliminatedCauses: []string{NotEliminated, EliminatedByHazard},
|
||||
ExpectedEliminatedByIDs: []string{"", ""},
|
||||
ExpectedEliminatedOnTurns: []int{0, 42},
|
||||
},
|
||||
|
|
@ -1370,15 +1370,15 @@ func TestHazardDamagePerTurn(t *testing.T) {
|
|||
{100, 99, true, 100, NotEliminated, nil},
|
||||
{100, -1, false, 100, NotEliminated, nil},
|
||||
{99, -2, false, 100, NotEliminated, nil},
|
||||
{100, 100, false, 0, EliminatedByOutOfHealth, nil},
|
||||
{100, 101, false, 0, EliminatedByOutOfHealth, nil},
|
||||
{100, 999, false, 0, EliminatedByOutOfHealth, nil},
|
||||
{100, 100, false, 0, EliminatedByHazard, nil},
|
||||
{100, 101, false, 0, EliminatedByHazard, nil},
|
||||
{100, 999, false, 0, EliminatedByHazard, nil},
|
||||
{100, 100, true, 100, NotEliminated, nil},
|
||||
{2, 1, false, 1, NotEliminated, nil},
|
||||
{1, 1, false, 0, EliminatedByOutOfHealth, nil},
|
||||
{1, 999, false, 0, EliminatedByOutOfHealth, nil},
|
||||
{0, 1, false, 0, EliminatedByOutOfHealth, nil},
|
||||
{0, 999, false, 0, EliminatedByOutOfHealth, nil},
|
||||
{1, 1, false, 0, EliminatedByHazard, nil},
|
||||
{1, 999, false, 0, EliminatedByHazard, nil},
|
||||
{0, 1, false, 0, EliminatedByHazard, nil},
|
||||
{0, 999, false, 0, EliminatedByHazard, nil},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue