|
|
@ -134,18 +134,18 @@ class GameLogicTest { |
|
|
|
|
|
|
|
private static Stream<Arguments> testCasesForCheckForWin() { |
|
|
|
return Stream.of( |
|
|
|
Arguments.of("check win for player 1", 'x', true, new char[][] |
|
|
|
{{'x', '-', '-'}, |
|
|
|
{'x', '-', '-'}, |
|
|
|
{'x', '-', '-'}}), |
|
|
|
Arguments.of("check win for player 2", 'o', true, new char[][] |
|
|
|
{{'o', '-', '-'}, |
|
|
|
{'o', '-', '-'}, |
|
|
|
{'o', '-', '-'}}), |
|
|
|
Arguments.of("check win for player 2", 'o', false, new char[][] |
|
|
|
{{'o', '-', '-'}, |
|
|
|
{'o', '-', '-'}, |
|
|
|
{'-', '-', '-'}}) |
|
|
|
Arguments.of("check win in column 0 for player 1", 'x', true, new char[][] |
|
|
|
{{'x', '-', '-'}, |
|
|
|
{'x', '-', '-'}, |
|
|
|
{'x', '-', '-'}}), |
|
|
|
Arguments.of("check win in column 0 for player 2", 'o', true, new char[][] |
|
|
|
{{'o', '-', '-'}, |
|
|
|
{'o', '-', '-'}, |
|
|
|
{'o', '-', '-'}}), |
|
|
|
Arguments.of("check win in column 0 for player 2", 'o', false, new char[][] |
|
|
|
{{'o', '-', '-'}, |
|
|
|
{'o', '-', '-'}, |
|
|
|
{'-', '-', '-'}}) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|