From f6870cf5596375bf07be2f611f538d92f7f3cae8 Mon Sep 17 00:00:00 2001 From: Hong-Phuc Bui <hong-phuc.bui@htwsaar.de> Date: Tue, 13 May 2025 19:17:12 +0200 Subject: [PATCH] ue4, tictactoe --- ub-3/tictactoe.py | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ub-3/tictaktoe.py b/ub-3/tictactoe.py similarity index 95% rename from ub-3/tictaktoe.py rename to ub-3/tictactoe.py index c809e3b..dc96c9b 100644 --- a/ub-3/tictaktoe.py +++ b/ub-3/tictactoe.py @@ -41,7 +41,7 @@ print("Eingabe nicht in Ordnung") -def pruefe_comination(p, board): +def pruefe_combination(p, board): r = p[0] c = p[1] combination = p[2] @@ -70,8 +70,9 @@ for p in position: r = p[0] c = p[1] + print(p, player) if board[r][c] == player: - return pruefe_comination(p, board) + return pruefe_combination(p, board) else: return False @@ -98,7 +99,9 @@ empty_cells = empty_cells - 1 return (empty_cells == 0, 0) - + + + print_tafel(tafel) aktuelle_spieler = 1 @@ -111,7 +114,7 @@ if aktuelle_spieler == 1: aktuelle_spieler = 2 else: - aktuelle_spieler = 1 + aktuelle_spieler = 1 print("Spiel beendet!") -- Gitblit v1.10.0-SNAPSHOT