basic 2 player wordgame
mwilson at the-wire.com
Tue Sep 21 14:39:00 CEST 2010
> I am working on a simple wordgame exercise: 2 players form a word by
> alternating turns saying a letter, which is added on to the end of the
> word fragment.
> I am familiar with loops, iterations etc but i need a hint as to how
> to approach alternating turns when writing this code?
One way (not tested):
thisplayer = Player()
otherplayer = Player()
thisplayer, otherplayer = otherplayer, thisplayer
More information about the Python-list