Hong-Phuc Bui
2025-05-19 fdd19095eff1e3c14798d60e746b09d9951a2f14
vorlesung
1 files modified
17 ■■■■ changed files
ub-3/tictactoe_test.py 17 ●●●● patch | view | raw | blame | history
ub-3/tictactoe_test.py
@@ -1,7 +1,7 @@
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],
@@ -12,7 +12,7 @@
    assert result
def test_pruefe_combination_vertikal():
def test_pruefe_combination_vertikal_hvd():
    test_board = [
        [PL1, EMPTY, EMPTY],
        [PL1, PL2,   EMPTY],
@@ -23,7 +23,7 @@
    assert result
def test_pruefe_combination_diagonal():
def test_pruefe_combination_diagonal_hvd():
    test_board = [
        [PL1, EMPTY, EMPTY],
        [PL2, PL1,   EMPTY],
@@ -32,3 +32,14 @@
    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