def do_move(self, board: Board) -> object:
        if self.action is None:
            raise Exception('No action has been performed yet')

        child = self.copy()
        child.action = None

        x_offset, y_offset = self.direction.to_direction_tuple()

        if self.direction == PlayerDirection.UP:
            child.position_y -= self.speed
        elif self.direction == PlayerDirection.RIGHT:
            child.position_x += self.speed
        elif self.direction == PlayerDirection.DOWN:
            child.position_y += self.speed
        elif self.direction == PlayerDirection.LEFT:
            child.position_x -= self.speed

        # Calculate the new steps
        child.steps_to_this_point = list(
            Board.get_points_in_rectangle(self.position_x + x_offset,
                                          self.position_y + y_offset,
                                          child.position_x, child.position_y))

        jump_needed = False
        for x, y in child.steps_to_this_point[1:-1]:
            if board.point_is_available(x, y):
                jump_needed = True

        if jump_needed and self.roundModulo == -1:
            self.roundModulo = 0

        # Remove the jumped over cells
        do_jump = self.roundModulo == 0
        while do_jump and len(child.steps_to_this_point) > 2:
            child.steps_to_this_point.pop(1)

        # Add self to previous of child
        child.previous.append(self)

        # All new passed positions
        for step in child.steps_to_this_point:
            child.collided_with_own_line |= bool(
                child.all_steps.get(step, False))
            if not child.collided_with_own_line:
                child.all_steps.setdefault(step, child)

        # Increase round modulo
        if self.roundModulo == -1:
            child.roundModulo = -1
        else:
            child.roundModulo = (self.roundModulo + 1) % 6

        return child
    def do_move(self) -> object:
        if self.action is None:
            raise Exception('No action has been performed yet')

        child = self.copy()
        child.action = None

        x_offset = 0
        y_offset = 0

        if self.direction == PlayerDirection.UP:
            child.position_y -= self.speed
            y_offset = -1
        elif self.direction == PlayerDirection.RIGHT:
            child.position_x += self.speed
            x_offset = 1
        elif self.direction == PlayerDirection.DOWN:
            child.position_y += self.speed
            y_offset = 1
        elif self.direction == PlayerDirection.LEFT:
            child.position_x -= self.speed
            x_offset = -1

        # Calculate the new steps
        child.steps_to_this_point = list(
            Board.get_points_in_rectangle(self.position_x + x_offset,
                                          self.position_y + y_offset,
                                          child.position_x, child.position_y))
        # Remove the jumped over cells
        do_jump = self.game_round % 6 == 0
        while do_jump and len(child.steps_to_this_point) > 2:
            child.steps_to_this_point.pop(1)

        # Add self to previous of child
        child.previous.append(self)

        # All new passed positions
        for step in child.steps_to_this_point:
            child.collided_with_own_line |= bool(
                child.all_steps.get(step, False))
            if not child.collided_with_own_line:
                child.all_steps.setdefault(step, child)

        # Increase round number
        child.game_round += 1

        return child