def terminal_test(gameState):
    """ Return True if the game is over for the active player
    and False otherwise.
    """
    legal_moves = gameState.get_legal_moves()
    if len(legal_moves) == 0:
        return True
    return False