class Unit:
    """
    A class to represent a unit in the game.

    Attributes
    ----------
    position : tuple
        The current position of the unit (default is (0, 0)).
    position_before : tuple
        The position of the unit before the last update.
    state : int
        The current state of the unit (default is 0).
    speed : float
        The delay between updates in seconds (default is 0.05).
    partial_move : int
        The partial move value (default is 0).

    Methods
    -------
    __init__(self, position=(0,0))
        Initializes the unit with a given position.
    """
    def __init__(self, position=(0,0)):
        self.position = position
        self.position_before = self.position
        self.state = 0
        self.partial_move = 1
