Changeset 318 for trunk/Forms/FormUnitMoves.pas
- Timestamp:
- Jun 21, 2024, 3:20:20 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormUnitMoves.pas
r317 r318 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 FormEx ;7 FormEx, Game; 8 8 9 9 type … … 16 16 procedure ListView1Data(Sender: TObject; Item: TListItem); 17 17 public 18 Game: TGame; 18 19 procedure ReloadList; 19 20 end; … … 23 24 24 25 uses 25 Game, Core,Player;26 Player; 26 27 27 28 {$R *.lfm} … … 31 32 procedure TFormUnitMoves.ListView1Data(Sender: TObject; Item: TListItem); 32 33 begin 33 if Assigned( Core.Core.Game) and Assigned(Core.Core.Game.CurrentPlayer) then34 with Core.Core.Game.CurrentPlayer do34 if Assigned(Game) and Assigned(Game.CurrentPlayer) then 35 with Game.CurrentPlayer do 35 36 if (Mode = pmHuman) and (Item.Index < Moves.Count) then 36 37 with TUnitMove(Moves[Item.Index]) do begin … … 49 50 procedure TFormUnitMoves.ReloadList; 50 51 begin 51 if Assigned( Core.Core.Game) and Assigned(Core.Core.Game.CurrentPlayer) and52 ( Core.Core.Game.CurrentPlayer.Mode = pmHuman) then53 ListView1.Items.Count := Core.Core.Game.CurrentPlayer.Moves.Count52 if Assigned(Game) and Assigned(Game.CurrentPlayer) and 53 (Game.CurrentPlayer.Mode = pmHuman) then 54 ListView1.Items.Count := Game.CurrentPlayer.Moves.Count 54 55 else ListView1.Items.Count := 0; 55 56 ListView1.Refresh;
Note:
See TracChangeset
for help on using the changeset viewer.