<[EMAIL PROTECTED]> wrote:
> The only problem I have is whenever player two goes, it says the cell
> is filled. But the code:
>
> if gameboard[cell] not in 'OX':
>gameboard[cell] = 'X'
>else:
>print "This cell is already filled."
>turnnu
[EMAIL PROTECTED] writes:
> The code's indentation was fine - I forgot to declare cell in player
> two's section and not just in player one.
>
> The code (including the win check, for once!) is working. The last
> obstacle is my tie checker; it doesn't seem to like what I have:
>
> if ((gameboard
The code's indentation was fine - I forgot to declare cell in player
two's section and not just in player one.
The code (including the win check, for once!) is working. The last
obstacle is my tie checker; it doesn't seem to like what I have:
if ((gameboard[0:9] is 'X' or 'O') and (win == 0)):
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>Greetings! I am trying to make a multiplayer (no AI, 2 person) game of
>tic tac toe in Python. So far it has been pretty simple. My only
>concern is with the win checking to see if a person has won. At first
>it looked like it was wor
[EMAIL PROTECTED] writes:
> Nevermind my previous reply: I've been fixing up the code and
> understand it. I'm at a nifty 80 lines where I am at now rather than
> 209 lines in the previous version! The changes are immense!
>
> The only problem I have is whenever player two goes, it says the cell
Nevermind my previous reply: I've been fixing up the code and
understand it. I'm at a nifty 80 lines where I am at now rather than
209 lines in the previous version! The changes are immense!
The only problem I have is whenever player two goes, it says the cell
is filled. But the code:
if gameb
So is there a way I have to set up the string OX in the beginning? Is
this where it houses the location of the Xs and Os to determine whether
or not a letter is already there?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
> Thank you. It seems I didn't understand logic statements as much as I
> thought I did!
>
> The one remaining question I have deals with this:
>
> if gameboard[cell] not in 'OX':
> gameboard[cell] = 'O'
> else:
> print "This cell is already filled."
Thank you. It seems I didn't understand logic statements as much as I
thought I did!
The one remaining question I have deals with this:
if gameboard[cell] not in 'OX':
gameboard[cell] = 'O'
else:
print "This cell is already filled."
turnnumber -= 1
(gameboard[cell]
[EMAIL PROTECTED] writes:
> Greetings! I am trying to make a multiplayer (no AI, 2 person) game of
> tic tac toe in Python. So far it has been pretty simple. My only
> concern is with the win checking to see if a person has won. At first
> it looked like it was working, but now it sometimes as
This site will help you get a useful answer:
http://www.catb.org/~esr/faqs/smart-questions.html
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo