diff --git a/exercises/practice/game-of-life/test/game_of_life_test.dart b/exercises/practice/game-of-life/test/game_of_life_test.dart index 728239fb..970e8af4 100644 --- a/exercises/practice/game-of-life/test/game_of_life_test.dart +++ b/exercises/practice/game-of-life/test/game_of_life_test.dart @@ -4,20 +4,20 @@ import 'package:test/test.dart'; void main() { group('Game of Life', () { test('empty matrix', () { - final List> matrix = []; - final game = GameOfLife(matrix); + final List> input = []; + final game = GameOfLife(input); game.tick(); final List> expected = []; expect(game.matrix(), expected); }, skip: false); test('live cells with zero live neighbors die', () { - final List> matrix = [ + final List> input = [ [0, 0, 0], [0, 1, 0], [0, 0, 0], ]; - final game = GameOfLife(matrix); + final game = GameOfLife(input); game.tick(); final List> expected = [ [0, 0, 0], @@ -28,12 +28,12 @@ void main() { }, skip: true); test('live cells with only one live neighbor die', () { - final List> matrix = [ + final List> input = [ [0, 0, 0], [0, 1, 0], [0, 1, 0], ]; - final game = GameOfLife(matrix); + final game = GameOfLife(input); game.tick(); final List> expected = [ [0, 0, 0], @@ -44,12 +44,12 @@ void main() { }, skip: true); test('live cells with two live neighbors stay alive', () { - final List> matrix = [ + final List> input = [ [1, 0, 1], [1, 0, 1], [1, 0, 1], ]; - final game = GameOfLife(matrix); + final game = GameOfLife(input); game.tick(); final List> expected = [ [0, 0, 0], @@ -60,12 +60,12 @@ void main() { }, skip: true); test('live cells with three live neighbors stay alive', () { - final List> matrix = [ + final List> input = [ [0, 1, 0], [1, 0, 0], [1, 1, 0], ]; - final game = GameOfLife(matrix); + final game = GameOfLife(input); game.tick(); final List> expected = [ [0, 0, 0], @@ -76,12 +76,12 @@ void main() { }, skip: true); test('dead cells with three live neighbors become alive', () { - final List> matrix = [ + final List> input = [ [1, 1, 0], [0, 0, 0], [1, 0, 0], ]; - final game = GameOfLife(matrix); + final game = GameOfLife(input); game.tick(); final List> expected = [ [0, 0, 0], @@ -92,12 +92,12 @@ void main() { }, skip: true); test('live cells with four or more neighbors die', () { - final List> matrix = [ + final List> input = [ [1, 1, 1], [1, 1, 1], [1, 1, 1], ]; - final game = GameOfLife(matrix); + final game = GameOfLife(input); game.tick(); final List> expected = [ [1, 0, 1], @@ -108,7 +108,7 @@ void main() { }, skip: true); test('bigger matrix', () { - final List> matrix = [ + final List> input = [ [1, 1, 0, 1, 1, 0, 0, 0], [1, 0, 1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 1, 1, 1], @@ -118,7 +118,7 @@ void main() { [0, 0, 1, 0, 1, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1, 1], ]; - final game = GameOfLife(matrix); + final game = GameOfLife(input); game.tick(); final List> expected = [ [1, 1, 0, 1, 1, 0, 0, 0],