def print_board(player_name, player_view):
    """Print a player board

    Args:
        player_name (str): name of current player
        player_view (List[str]): list of strings representing board view
    """

    # board titles
    print("   {:_^22}\n".format(player_name + "'s board:"))
    # stitch together board views for display
    for player_line in player_view:
        print("   {:22}".format(player_line))
    print_legend()
Example #2
0
def print_board(player_name, player_view):
    """Print a player board

    Args:
        player_name (str): name of current player
        player_view (List[str]): list of strings representing board view
    """

    # board titles
    print("   {:_^22}\n".format(player_name + "'s board:"))
    # stitch together board views for display
    for player_line in player_view:
        print("   {:22}".format(player_line))
    print_legend()
Example #3
0
def print_all_boards(opp_name, player_name, opp_view, player_view):
    """Print both player boards

    Args:
        opp_name (str): name of opponent
        player_name (str): name of current player
        opp_view (List[str]): list of strings representing board view
        player_view (List[str]): list of strings representing board view
    """
    # boards titles
    print("   {:_^22}        {:_^22}\n".format(opp_name + "'s board:",
                                               player_name + "'s board:"))
    # stitch together board views for display
    for opp_line, player_line in zip(opp_view, player_view):
        print("   {:22}        {:22}".format(opp_line, player_line))
    print_legend()
Example #4
0
def print_all_boards(opp_name, player_name, opp_view, player_view):
    """Print both player boards

    Args:
        opp_name (str): name of opponent
        player_name (str): name of current player
        opp_view (List[str]): list of strings representing board view
        player_view (List[str]): list of strings representing board view
    """

    # boards titles
    print("   {:_^22}        {:_^22}\n".format(
        opp_name + "'s board:", player_name + "'s board:"))
    # stitch together board views for display
    for opp_line, player_line in zip(opp_view, player_view):
        print("   {:22}        {:22}".format(opp_line, player_line))
    print_legend()