Changeset 414 for trunk/Game.pas


Ignore:
Timestamp:
Jan 10, 2025, 4:24:19 PM (7 hours ago)
Author:
chronos
Message:
  • Modified: Lowered idle CPU consumption.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Game.pas

    r407 r414  
    5959    procedure WinObjectiveMapPrepare;
    6060    procedure BuildCity(Cell: TCell);
     61    procedure DoChange;
    6162  public
    6263    GameSystem: TGameSystem;
     
    510511end;
    511512
     513procedure TGame.DoChange;
     514begin
     515  if Assigned(FOnChange) then
     516    FOnChange(Self);
     517end;
     518
    512519procedure TGame.Assign(Source: TGame);
    513520begin
     
    678685    FreeAndNil(Doc);
    679686  end;
     687  DoChange;
    680688end;
    681689
     
    851859  CurrentPlayer.RemoveInvalidMoves;
    852860  CurrentPlayer.InitUnitMoves;
    853   if Assigned(FOnChange) then
    854     FOnChange(Self);
     861  DoChange;
    855862end;
    856863
     
    10091016
    10101017  ComputePlayerStats;
     1018  DoChange;
    10111019end;
    10121020
     
    10151023  Running := False;
    10161024  if Assigned(OnWin) then OnWin(Winner);
     1025  DoChange;
    10171026end;
    10181027
Note: See TracChangeset for help on using the changeset viewer.