Пример #1
0
 def testGame(self):
     b = Board()
     a = Ai()
     g = Game(b, a)
     self.assertEquals(g.getAiPlaneCount(), 0)
     g.addPlane(0, 2, 'S')
     g.addPlane(0, 7, 'S')
     g.addPlane(4, 6, 'S')
     self.assertEquals(g.getFromPosition(0, 2), 2)
     g.chooseAiPlanes()
     self.assertEquals(g.getAiPlaneCount(), 3)
     while g.isGameWon() == False:
         g.makeAiMove()
     self.assertEquals(g.wonPlayer(), False)