def nash(self, payoff_matrix: list, player_1_strategies: list, player_2_strategies: list) -> tuple:
    '\n        Takes a payoff matrix from game theory and the available strategies for\n        both players. Solves for the Nash equilibrium\n        '
    work = ''
    no_dominant_exists = False
    while ((not no_dominant_exists) and (not ((len(player_1_strategies) == 1) and (len(player_2_strategies) == 1)))):
        is_break = False
        for i in range(len(payoff_matrix)):
            for j in range(len(payoff_matrix)):
                if ((i != j) and (i < len(payoff_matrix)) and (j < len(payoff_matrix))):
                    is_greater = False
                    for k in range(len(payoff_matrix[0])):
                        if (float(payoff_matrix[i][k][0]) >= float(payoff_matrix[j][k][0])):
                            is_greater = True
                        if is_greater:
                            break
                    if (not is_greater):
                        work += (((("Player 2's Strategy " + str(player_2_strategies[j])) + ' dominates strategy ') + str(player_2_strategies[i])) + '\n')
                        payoff_matrix.pop(i)
                        player_2_strategies.pop(i)
                        is_break = True
                        work += self.format_payoff_matrix(payoff_matrix, player_1_strategies, player_2_strategies)
                        work += '\n'
                        break
                if is_break:
                    break
        if (not is_break):
            no_dominant_exists = True
        else:
            no_dominant_exists = False
        is_break = False
        for i in range(len(payoff_matrix[0])):
            for j in range(len(payoff_matrix[0])):
                if ((i != j) and (i < len(payoff_matrix[0])) and (j < len(payoff_matrix[0]))):
                    is_greater = False
                    for k in range(len(payoff_matrix)):
                        if (float(payoff_matrix[k][i][1]) >= float(payoff_matrix[k][j][1])):
                            is_greater = True
                        if is_greater:
                            break
                    if (not is_greater):
                        work += (((("Player 1's Strategy " + str(player_1_strategies[j])) + ' dominates strategy ') + str(player_1_strategies[i])) + '\n')
                        for index in range(len(payoff_matrix)):
                            payoff_matrix[index].pop(i)
                        player_1_strategies.pop(i)
                        work += self.format_payoff_matrix(payoff_matrix, player_1_strategies, player_2_strategies)
                        work += '\n'
                        is_break = True
                        break
                if (not is_break):
                    no_dominant_exists = True
                else:
                    no_dominant_exists = False
        if is_break:
            no_dominant_exists = False
    if (not ((len(player_1_strategies) == 1) and (len(player_2_strategies) == 1))):
        ans = ('There is no Nash equilibrium, since at least one player has' + ' multiple viable strategies.\n')
        work += ans
        work += self.format_payoff_matrix(payoff_matrix, player_1_strategies, player_2_strategies)
    else:
        ans = ('This is the Nash equilibrium of the entered payoff matrix,' + ' calculated by eliminating dominanted strategies.\n')
        ans += self.format_payoff_matrix(payoff_matrix, player_1_strategies, player_2_strategies)
        work += ans
    return (ans, work)
Takes a payoff matrix from game theory and the available strategies for
both players. Solves for the Nash equilibrium
def nash(self, payoff_matrix: list, player_1_strategies: list, player_2_strategies: list) -> tuple:
    '\n        Takes a payoff matrix from game theory and the available strategies for\n        both players. Solves for the Nash equilibrium\n        '
    work = 
    no_dominant_exists = False
    while ((not no_dominant_exists) and (not ((len(player_1_strategies) == 1) and (len(player_2_strategies) == 1)))):
        is_break = False
        for i in range(len(payoff_matrix)):
            for j in range(len(payoff_matrix)):
                if ((i != j) and (i < len(payoff_matrix)) and (j < len(payoff_matrix))):
                    is_greater = False
                    for k in range(len(payoff_matrix[0])):
                        if (float(payoff_matrix[i][k][0]) >= float(payoff_matrix[j][k][0])):
                            is_greater = True
                        if is_greater:
                            break
                    if (not is_greater):
                        work += (((("Player 2's Strategy " + str(player_2_strategies[j])) + ' dominates strategy ') + str(player_2_strategies[i])) + '\n')
                        payoff_matrix.pop(i)
                        player_2_strategies.pop(i)
                        is_break = True
                        work += self.format_payoff_matrix(payoff_matrix, player_1_strategies, player_2_strategies)
                        work += '\n'
                        break
                if is_break:
                    break
        if (not is_break):
            no_dominant_exists = True
        else:
            no_dominant_exists = False
        is_break = False
        for i in range(len(payoff_matrix[0])):
            for j in range(len(payoff_matrix[0])):
                if ((i != j) and (i < len(payoff_matrix[0])) and (j < len(payoff_matrix[0]))):
                    is_greater = False
                    for k in range(len(payoff_matrix)):
                        if (float(payoff_matrix[k][i][1]) >= float(payoff_matrix[k][j][1])):
                            is_greater = True
                        if is_greater:
                            break
                    if (not is_greater):
                        work += (((("Player 1's Strategy " + str(player_1_strategies[j])) + ' dominates strategy ') + str(player_1_strategies[i])) + '\n')
                        for index in range(len(payoff_matrix)):
                            payoff_matrix[index].pop(i)
                        player_1_strategies.pop(i)
                        work += self.format_payoff_matrix(payoff_matrix, player_1_strategies, player_2_strategies)
                        work += '\n'
                        is_break = True
                        break
                if (not is_break):
                    no_dominant_exists = True
                else:
                    no_dominant_exists = False
        if is_break:
            no_dominant_exists = False
    if (not ((len(player_1_strategies) == 1) and (len(player_2_strategies) == 1))):
        ans = ('There is no Nash equilibrium, since at least one player has' + ' multiple viable strategies.\n')
        work += ans
        work += self.format_payoff_matrix(payoff_matrix, player_1_strategies, player_2_strategies)
    else:
        ans = ('This is the Nash equilibrium of the entered payoff matrix,' + ' calculated by eliminating dominanted strategies.\n')
        ans += self.format_payoff_matrix(payoff_matrix, player_1_strategies, player_2_strategies)
        work += ans
    return (ans, work)