mirror of
https://github.com/neogeek23/Tic-Tac-Toe.git
synced 2026-02-04 10:58:17 +00:00
Add files via upload
Moved definition of variable to be outside of loop as it doesn't need to be defined on each iteration.
This commit is contained in:
parent
3d55ed4a48
commit
36c701c909
@ -341,11 +341,11 @@ def create_board_from_inputs():
|
||||
|
||||
def play_tic_tac_toe(board):
|
||||
turn = 0
|
||||
max_attempts = 3
|
||||
while not board.is_full() and not board.has_winner():
|
||||
board.display()
|
||||
player_to_play = turn % 2
|
||||
move_attempts = 1
|
||||
max_attempts = 3
|
||||
coordinate_move = input(
|
||||
"\nPlayer " + str(player_to_play + 1) +
|
||||
" please input coordinates (<nth index>.<nth - 1 index>. ... .<3rd index>.<rows>.<cols>) to place your '" +
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user