コード例 #1
0
ファイル: game.py プロジェクト: reubenchristie/Tic-Tac-Toe
 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
コード例 #2
0
 def setUp(self):
     self.board = board.board(human='O', computer='X')