1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
| from tictactoe import pruefe_combination, has_spieler_gewonnen, PL1, PL2, EMPTY
|
|
| def test_pruefe_combination_horizontal():
| test_board = [
| [PL1, PL1, PL1],
| [EMPTY, PL2, EMPTY],
| [EMPTY, PL2, EMPTY]
| ]
|
| result = pruefe_combination( (0,0,"hvd"), test_board )
| assert result
|
|
| def test_pruefe_combination_vertikal():
| test_board = [
| [PL1, EMPTY, EMPTY],
| [PL1, PL2, EMPTY],
| [PL1, PL2, EMPTY]
| ]
|
| result = pruefe_combination( (0,0,"hvd"), test_board )
| assert result
|
|
| def test_pruefe_combination_diagonal():
| test_board = [
| [PL1, EMPTY, EMPTY],
| [PL2, PL1, EMPTY],
| [PL1, EMPTY, PL1]
| ]
|
| result = pruefe_combination( (0,0,"hvd"), test_board )
| assert result
|
|