hi
I'm trying to write a game where I play against the computer...and as u see below..I really suck at it..
can someone pleeease help me..I want it to be as simple as possible..
thanks
input random
game = raw_input("Your turn. Input the coordinate for your move on the form x,y: ")
for turn in range(9):
def print_board(board):
board = board.replace("_"," ")
print "." + "---." * 3
for bound in [0,3,6]:
print "|",
for sym in board[bound:bound+3]:
print sym, "|",
if bound < 6:
print "\n|" + "---|" * 3
print "\n'" + "---'" * 3
Empty = ' '
Player_X = 'x'
Computer_O = 'o'
a = 0,0
b = 0,1
c = 0,2
d = 1,0
e = 1,1
f = 1,2
g = 2,0
h = 2,1
i = 2,2
winlist = [(a,b,c), (d,e,f), (g,h,i), (a,d,g,), (b,e,h), (c,f,i), (a,e,i), (g,e,c)]
opponent = { Player_X : Computer_O, Computer_O : Player_X }
if winner == player:
print: ("I win!")
if winner == computer:
print: ("You win!")
if winner == none:
print: ("None")
board ()
raw_input ( 'Remi' )