|
26 | 26 |
|
27 | 27 | 4. RESET would reset thecurrent game session and
|
28 | 28 | start over a fresh board.
|
29 |
| -
|
30 | 29 | """
|
31 | 30 |
|
32 | 31 | import os
|
33 | 32 | import numpy as np
|
34 | 33 | import PySimpleGUI as sg
|
35 | 34 |
|
| 35 | +# change the default theme. |
| 36 | +# sg.theme('dark grey 9') |
| 37 | + |
36 | 38 | INIT_WINDOW = None
|
37 | 39 | GAME_BOARD = None
|
38 | 40 |
|
@@ -237,7 +239,7 @@ def is_winning():
|
237 | 239 |
|
238 | 240 | def display_winner_and_continue(winning_marker: str):
|
239 | 241 | '''display the winner of the current board.
|
240 |
| -
|
| 242 | +
|
241 | 243 | PARAMS:
|
242 | 244 | 1. winning_marker - the marker that won the current board.
|
243 | 245 | '''
|
@@ -272,7 +274,11 @@ def init_game_window():
|
272 | 274 |
|
273 | 275 | def reset_game_board(reset_board: str):
|
274 | 276 | '''Resets the current game board and re-initializes all the
|
275 |
| -game parameters to continue playing the game with the same players.''' |
| 277 | +game parameters to continue playing the game with the same players. |
| 278 | +
|
| 279 | +PARAMS: |
| 280 | +1. reset_board - resets the current board to the initial state. |
| 281 | +''' |
276 | 282 |
|
277 | 283 | global GAME_PROGRESS_ARRAY
|
278 | 284 | global STEP_COUNTER
|
@@ -394,7 +400,7 @@ def initialize_game_board():
|
394 | 400 | else PLAYER2_MARKER if CURRENT_MARKER == PLAYER2_MARKER else ' ')
|
395 | 401 |
|
396 | 402 | # Change the color of the player text to mark
|
397 |
| -# the next player's turn. 'DarkBlue indicates |
| 403 | +# the next player's turn. 'DarkBlue' indicates |
398 | 404 | # the player who should make the next move.'
|
399 | 405 | # Additionally, Once the player has made a move,
|
400 | 406 | # disable the button.
|
|
0 commit comments