def test_move_valid(self): player, _, _, _ = create_player(Team.BLUE, self.hcriat) for d in ('n', 's', 'o', 'e'): before_x, before_y = player.get_coor() moved_player = move_player(player.get_uid(), d, self.hcriat) self.assertTrue(before_x != moved_player.x or before_y != moved_player.y) player.bloqM.unblock()
def test_blocking_position(self): player, _, _, _ = create_player(Team.BLUE, self.hcriat) for d in ('o', 'o', 'o'): move_player(player.get_uid(), d, self.hcriat) player.bloqM.unblock() self.assertRaises(BlockedPosition, move_player, player.get_uid(), 'o', self.hcriat)