All pastes #385824 Raw Edit

GameCode

public text v1 · immutable
·published 2007-03-08 03:04 UTC
rendered paste body
Procedure Battle;
begin
  PA := 0;
  PB := 0;
  PC := 0;
  PD := 0;

  if SpeedA > SpeedB then begin
    PA := PA+1;
  end;

  if SpeedA > SpeedC then begin
    PA := PA+1;
  end;

  if SpeedA > SpeedD then begin
    PA := PA+1;
  end;

  if SpeedB > SpeedA then begin
    PB := PB+1;
  end;

  if SpeedB > SpeedC then begin
    PB := PB+1;
  end;

  if SpeedB > SpeedD then begin
    PB := PB+1;
  end;

  if SpeedC > SpeedA then begin
    PC := PC+1;
  end;

  if SpeedC > SpeedB then begin
    PC := PC+1;
  end;

  if SpeedC > SpeedD Then begin
    PC := PC+1;
  end;

  if SpeedD > SpeedA then begin
    PD := PD+1;
  end;

  if SpeedD > SpeedB then begin
    PD := PD+1;
  end;

  if SpeedD > SpeedC then begin
    PD := PD+1;
  end;

  if SpeedA = SpeedB then begin
    if AgilityA > AgilityB then begin
      PA := PA+1;
    end;

    if AgilityB > AgilityA then begin
      PB := PB+1;
    end;
  end;

  if SpeedA = SpeedC then begin
    if AgilityA > AgilityC then begin
      PA := PA+1;
    end;

    if AgilityC > AgilityA then begin
      PC := PC+1;
    end;
  end;

  if SpeedA = SpeedD then begin
    if AgilityA > AgilityD then begin
      PA := PA+1;
    end;

    if AgilityD > AgilityA then begin
      PD := PD+1;
    end;
  end;

  if SpeedB = SpeedC then begin
    if AgilityB > AgilityC then begin
      PB := PB+1;
    end;

    if AgilityC > AgilityB then begin
      PC := PC+1;
    end;
  end;

  if SpeedB = SpeedD then begin
    if AgilityB > AgilityD then begin
      PB := PB+1;
    end;

    if AgilityD > AgilityB then begin
      PD := PD+1;
    end;
  end;

  if SpeedC = SpeedD then begin
    if AgilityC > AgilityD then begin
      PC := PC+1;
    end;

    if AgilityD > AgilityC then begin
      PD := PD+1;
    end;
  end;
end;