File was renamed from ub-3/tictaktoe.py |
| | |
| | | print("Eingabe nicht in Ordnung") |
| | | |
| | | |
| | | def pruefe_comination(p, board): |
| | | def pruefe_combination(p, board): |
| | | r = p[0] |
| | | c = p[1] |
| | | combination = p[2] |
| | |
| | | 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 |
| | | |
| | |
| | | empty_cells = empty_cells - 1 |
| | | return (empty_cells == 0, 0) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | print_tafel(tafel) |
| | | aktuelle_spieler = 1 |
| | | |
| | |
| | | if aktuelle_spieler == 1: |
| | | aktuelle_spieler = 2 |
| | | else: |
| | | aktuelle_spieler = 1 |
| | | aktuelle_spieler = 1 |
| | | |
| | | print("Spiel beendet!") |
| | | |