function P=fight(i,j,U,n,P)
  Hist=[];
  p1=0;
  p2=0;
  for x=1:n;
    s1=strat(i,Hist,U,n);
    if(s1!=1) s1=2; endif;
    s2=strat(j,flipud(Hist),U,n);
    if(s2!=1) s2=2; endif;
    Hist=[Hist,[s1;s2]];
    p1+=U(s1,s2);
    p2+=U(s2,s1);
  endfor;
  P(i,j)=p1;
  P(j,i)=p2;
#  newplot();
#  hold on;
#  plot(Hist(1,:),"color",'b');
#  plot(Hist(2,:),"color",'r');
#  hold off;
#  disp("History");
#  disp(Hist);
#  disp("kek sarok");
#  disp(p1);
#  disp("piros sarok");
#  disp(p2);
endfunction