| | |
| | | from tictactoe import pruefe_combination, has_spieler_gewonnen, PL1, PL2, EMPTY |
| | | |
| | | |
| | | def test_pruefe_combination_horizontal(): |
| | | def test_pruefe_combination_horizontal_hvd(): |
| | | test_board = [ |
| | | [PL1, PL1, PL1], |
| | | [EMPTY, PL2, EMPTY], |
| | |
| | | assert result |
| | | |
| | | |
| | | def test_pruefe_combination_vertikal(): |
| | | def test_pruefe_combination_vertikal_hvd(): |
| | | test_board = [ |
| | | [PL1, EMPTY, EMPTY], |
| | | [PL1, PL2, EMPTY], |
| | |
| | | assert result |
| | | |
| | | |
| | | def test_pruefe_combination_diagonal(): |
| | | def test_pruefe_combination_diagonal_hvd(): |
| | | test_board = [ |
| | | [PL1, EMPTY, EMPTY], |
| | | [PL2, PL1, EMPTY], |
| | |
| | | |
| | | result = pruefe_combination( (0,0,"hvd"), test_board ) |
| | | assert result |
| | | |
| | | |
| | | def test_pruefe_combination_horizontal_h(): |
| | | test_board = [ |
| | | [PL1, EMPTY, EMPTY], |
| | | [PL1, PL1, PL1], |
| | | [PL2, PL1, PL1] |
| | | ] |
| | | |
| | | result = pruefe_combination( (1,0,"h"), test_board ) |
| | | assert result |