Ich möchte Option Choice Player in Tic TAC Game Python [geschlossen] machen

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Ich möchte Option Choice Player in Tic TAC Game Python [geschlossen] machen

by Anonymous » 06 Feb 2025, 08:58

Hallo allerseits, sie möchte Option Choice Player in meinem TIC TAC Toe x/o
machen

Code: Select all

import random

board = ["-", "-", "-",
"-", "-", "-",
"-", "-", "-"]
curretPlayer="X"
Winner = None
gameRunning = True

# printing the game board
def printBoard(board):
print(board[0] + " | " + board[1] + " | " + board[2])
print(8*"-")
print(board[3] + " | " + board[4] + " | " + board[5])
print(8*"-")
print(board[6] + " | " + board[7] + " | " + board[8])
printBoard(board)

# take player input
def playerInput(board):
inp = int(input("Enter a number 1-9: "))
if inp >= 1 and inp

Top