def test_move_dead(self): """ You can't move when dead """ pawn = Pawn() pawn.kill() self.assertRaises(YoureDead, pawn.move, 'u')
def test_kill(self): """ You can kill pawns """ pawn = Pawn() pawn.kill() self.assertEqual(pawn.alive, False)
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)