# If any row does have a match, flag that there is a win # Check if any of the rows have all the same value (and is not empty) # Then also make sure the spot is available on the board # Whatever the user inputs, make sure it is a valid input, and the spot is open ![]() # Since the game is over, print the winner or tie # Loop until the game stops (winner or tie) Position = input("Choose a position from 1-9: ") Player_2 = input("Enter Second Player Name:") Player_1 = input("Enter First Player Name:") Input_1 = int(input("Please Select An Option")) # Tells us who the current player is (X goes first) ![]() I can't keep the previous stats of the game as well. So basically I am trying to build a Tic-Tac-Toe game with both single and multiplayer difficulty levels but I am stuck on what code should I write for player vs computer and I am stuck in a forever loop in the def play_game() function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |