<filename>bots/rand/rand.py
"""
RandomBot -- A simple strategy: enumerates all legal moves, and picks one
uniformly at random.
"""

# Import the API objects
from api import State
import random


class Bot:

    def __init__(self):
        pass

    def get_move(self, state):
        # type: (State) -> tuple[int, int]
        """
        Function that gets called every turn. This is where to implement the strategies.
        Be sure to make a legal move. Illegal moves, like giving an index of a card you
        don't own or proposing an illegal mariage, will lose you the game.
       	TODO: add some more explanation
        :param State state: An object representing the gamestate. This includes a link to
            the states of all the cards, the trick and the points.
        :return: A tuple of integers or a tuple of an integer and None,
            indicating a move; the first indicates the card played in the trick, the second a
            potential spouse.
        """

        # All legal moves
        moves = state.moves()


        # Return a random choice
        return random.choice(moves)
<filename>bots/rand/rand.py
"""
RandomBot -- A simple strategy: enumerates all legal moves, and picks one
uniformly at random.
"""

# Import the API objects
from api import State
import random


class Bot:

    def __init__(self):
        pass

    def get_move(self, state):
        # type: (State) -> tuple[int, int]
        """
        Function that gets called every turn. This is where to implement the strategies.
        Be sure to make a legal move. Illegal moves, like giving an index of a card you
        don't own or proposing an illegal mariage, will lose you the game.
       	TODO: add some more explanation
        :param State state: An object representing the gamestate. This includes a link to
            the states of all the cards, the trick and the points.
        :return: A tuple of integers or a tuple of an integer and None,
            indicating a move; the first indicates the card played in the trick, the second a
            potential spouse.
        """

        # All legal moves
        moves = state.moves()


        # Return a random choice
        return random.choice(moves)
RandomBot -- A simple strategy: enumerates all legal moves, and picks one uniformly at random. # Import the API objects # type: (State) -> tuple[int, int] Function that gets called every turn. This is where to implement the strategies.         Be sure to make a legal move. Illegal moves, like giving an index of a card you         don't own or proposing an illegal mariage, will lose you the game.        	TODO: add some more explanation         :param State state: An object representing the gamestate. This includes a link to             the states of all the cards, the trick and the points.         :return: A tuple of integers or a tuple of an integer and None,             indicating a move; the first indicates the card played in the trick, the second a             potential spouse. # All legal moves # Return a random choice