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

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

Post by Anonymous »

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

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post