Changeset 262 for trunk/UPlayer.pas


Ignore:
Timestamp:
Sep 24, 2018, 11:46:31 PM (6 years ago)
Author:
chronos
Message:
  • Added: New game option to set cells without player units as neutral.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UPlayer.pas

    r258 r262  
    121121    procedure RemoveInvalidMoves;
    122122    procedure UpdateRepeatMoves;
     123    procedure UpdateEmptyCellsNeutral;
    123124    procedure MoveAll;
    124125    procedure Grow;
     
    10921093end;
    10931094
     1095procedure TPlayer.UpdateEmptyCellsNeutral;
     1096var
     1097  I: Integer;
     1098begin
     1099  if TGame(Game).EmptyCellsNeutral then
     1100  for I := 0 to PlayerMap.Cells.Count - 1 do
     1101  with TPlayerCell(PlayerMap.Cells[I]) do begin
     1102    if MapCell.Power = 0 then MapCell.Player := nil;
     1103  end;
     1104end;
     1105
    10941106procedure TPlayer.RemoveEmptyUnitMoves;
    10951107var
Note: See TracChangeset for help on using the changeset viewer.