Changeset 129 for trunk/UCore.pas


Ignore:
Timestamp:
Jun 18, 2017, 11:13:05 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: If only computer players are present in game then starts computer move immediatelly.
  • Fixed: Record players stats per entire turn and not per each player step.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r128 r129  
    5757    RegistryContext: TRegistryContext;
    5858    procedure LoadRecentExecute(Sender: TObject);
     59    procedure ProcessComputerTurns;
    5960    procedure StartNewGame;
    6061    procedure DoPlayerChange(Sender: TObject);
     
    274275end;
    275276
    276 procedure TCore.AGameEndTurnExecute(Sender: TObject);
     277procedure TCore.ProcessComputerTurns;
    277278var
    278279  Computer: TComputer;
    279280begin
    280   Game.NextTurn;
    281   FormMain.Redraw;
    282281  while Game.Running and (Game.CurrentPlayer.Mode <> pmHuman) do begin
    283282    if Game.CurrentPlayer.Mode = pmComputer then begin
     
    297296    Sleep(1);
    298297  end;
     298end;
     299
     300procedure TCore.AGameEndTurnExecute(Sender: TObject);
     301begin
     302  Game.NextTurn;
     303  FormMain.Redraw;
     304  ProcessComputerTurns;
    299305  UpdateActions;
    300306end;
     
    417423  FormMain.Redraw;
    418424  if FormCharts.Visible then FormCharts.Redraw;
     425  ProcessComputerTurns;
    419426  UpdateActions;
    420427end;
Note: See TracChangeset for help on using the changeset viewer.