import matplotlib.pyplot as plt
import nashpy as nash
import numpy as np

A = np.array([[1, -1], [-1, 1]])
game = nash.Game(A)
ys = [0, 1]
sigma_rs = [(1, 0), (0, 1)]
u_rs = [[game[sigma_r, (y, 1 - y)][0] for y in ys] for sigma_r in sigma_rs]
plt.plot(ys, u_rs[0], label="$(A\sigma_c^T)_1$")
plt.plot(ys, u_rs[1], label="$(A\sigma_c^T)_2$")
plt.xlabel("$\sigma_c=(y, 1-y)$")
plt.title("Utility to row player")
plt.legend()