Exemplo n.º 1
0
 def test_showavailmoves(self):
     move = Moves()
     self.assertEqual(move.showAvailMoves(), {'topRow':['l','m','r'],
                                              'midRow':['l','m','r'],
                                              'botRow':['l','m','r']})
     move.acceptMove({'mid': 'm', 'player': 2})
     self.assertEqual(move.showAvailMoves()['midRow'], ['l','r'])
     move.acceptMove({'mid': 'l', 'player': 1})
     move.acceptMove({'mid': 'r', 'player': 2})
     self.assertEqual(move.showAvailMoves()['midRow'], [])