示例#1
0
文件: test_game.py 项目: iffy/boom
 def test_move_dead(self):
     """
     You can't move when dead
     """
     pawn = Pawn()
     pawn.kill()
     self.assertRaises(YoureDead, pawn.move, 'u')
示例#2
0
文件: test_game.py 项目: iffy/boom
 def test_kill(self):
     """
     You can kill pawns
     """
     pawn = Pawn()
     pawn.kill()
     self.assertEqual(pawn.alive, False)
示例#3
0
文件: test_game.py 项目: iffy/boom
 def test_dropBomb_dead(self):
     """
     You can't drop bombs if you're dead
     """
     board, clock = bnc()
     board.generate(5,5)
     
     pawn = Pawn()
     board.insertPawn((0,0), pawn)
     pawn.kill()
     self.assertRaises(YoureDead, pawn.dropBomb)
     self.assertTrue((0,0) not in board.bombs)