def next_player(player):
    """
    Returns the player that plays after the specified player.

    :param int player: player for which to calculate the
                       next player. Must be 0, 1, 2, or 3.
    :return: the next player
    """
    return (player + 1) % 4
