Skip to content

Commit

Permalink
tests fixed after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
qjuanp committed Aug 16, 2024
1 parent 7b01e5b commit 48939e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions game_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestCountAliveNeighborsAllDead(t *testing.T) {
}

game := GameOfLife{currentBoard}
result := game.countAliveNeighboards(1, 1)
result := game.checkAliveNeighboars(1, 1)

if result != 0 {
t.Error("Miscalculation of alive neighbors when all dead")
Expand All @@ -44,7 +44,7 @@ func TestCountAliveNeighbors2AliveFromCenter(t *testing.T) {
}

game := GameOfLife{currentBoard}
result := game.countAliveNeighboards(1, 1)
result := game.checkAliveNeighboars(1, 1)

if result != 2 {
t.Error("Miscalculation of alive neighbors when all dead")
Expand All @@ -58,7 +58,7 @@ func TestCountAliveNeighborsAllAliveFromUpperLeftcorner(t *testing.T) {
{DEAD, DEAD, DEAD},
}
game := GameOfLife{currentBoard}
result := game.countAliveNeighboards(1, 1)
result := game.checkAliveNeighboars(1, 1)

if result != 3 {
t.Errorf("Miscalculation of alive neighbors when all dead | result=%d", result)
Expand Down

0 comments on commit 48939e0

Please sign in to comment.