Exemplo n.º 1
0
 def select_letters(self):
     """
     prompt human player to pick a letter
     """        
     choices = ['O','X']
     while(True):
     #while not (selection == 'X' or selection == 'O'):
         selection = raw_input('Choose X OR O\n').upper()
         if selection in choices:
             choices.remove(selection)
             self.board = board.board(human=selection, computer= choices[0])
             break
Exemplo n.º 2
0
 def setUp(self):
     self.board = board.board(human='O', computer='X')