Game theory has been widely used in many fields including economics, politics and military for a long period of time. Game theory can be divided into two situations: zero-sum and non-zero-sum, since both situations can appear in the fields very often and should be of great importance to research, the objective is to maximize the finial net payoff or minimize the loss by linear programming. In zero-sum situations, this paper will create the payoff matrix and by the Max-min theorem, this paper can get the constraints to satisfy the condition of using python code, the calculation result of the code gives that strategy 3 and 4 should be the best input if the opponent is also choosing the best strategy. For non-zero-sum situation, this paper will discuss firm competition and American presidential Election, payoff matrix, linear formulation will be used to help get the result of best election result. The result shows that the resources should be put into the state with the most votes and net approval rating, python calculation will give these results.