task1.py 489 Bytes
Newer Older
Adam Blank's avatar
Adam Blank committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def get_opponent(player):
    """
    Get the index of the opponent player.
    
    Args:
        player (int): current player (0 for Player 1, 1 for Player 2).
    
    Returns:
        int: opponent player (1 for Player 1's, 0 for Player 2's).
    """
    # TODO: complete the following line to return the value of the opponent of
    # the current player. Make sure to read the docstring above that details
    # what those values should be. Hint: our solution is a 1-liner.
    return