Changeset 31 for trunk/Forms
- Timestamp:
- Oct 12, 2019, 10:47:02 PM (5 years ago)
- Location:
- trunk/Forms
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormComputer.pas
r29 r31 13 13 TGameTry = class 14 14 Game: TGame; 15 Moves: array of T Direction;15 Moves: array of TMoveDirection; 16 16 constructor Create; 17 17 destructor Destroy; override; … … 58 58 function TGameTry.GetFitness: Double; 59 59 const 60 DirWeight: array[T Direction] of Double = (0.25, -10000, 0.5, 0.75);60 DirWeight: array[TMoveDirection] of Double = (0, 0.25, -10000, 0.5, 0.75); 61 61 var 62 62 I: Integer; … … 221 221 procedure TFormComputer.TryAllDirections(GameTries: TGameTries; GameTry: TGameTry); 222 222 var 223 Direction: T Direction;223 Direction: TMoveDirection; 224 224 NewTry: TGameTry; 225 225 begin 226 for Direction := Low(T Direction) to High(TDirection) do begin226 for Direction := Low(TMoveDirection) to High(TMoveDirection) do begin 227 227 if GameTry.Game.CanMoveDirection(Direction) then begin 228 228 NewTry := TGameTry.Create; -
trunk/Forms/UFormMain.lfm
r29 r31 37 37 Action = Core.AComputer 38 38 end 39 object MenuItem5: TMenuItem 40 Action = Core.AHistory 41 end 39 42 end 40 43 object MenuItemHelp: TMenuItem -
trunk/Forms/UFormMain.pas
r29 r31 19 19 MenuItem3: TMenuItem; 20 20 MenuItem4: TMenuItem; 21 MenuItem5: TMenuItem; 21 22 MenuItemTools: TMenuItem; 22 23 MenuItemNew: TMenuItem; -
trunk/Forms/UFormNew.lfm
r28 r31 8 8 ClientWidth = 487 9 9 DesignTimePPI = 144 10 OnClose = FormClose 10 11 OnCreate = FormCreate 12 OnShow = FormShow 11 13 LCLVersion = '2.0.2.0' 12 14 object Label1: TLabel -
trunk/Forms/UFormNew.pas
r28 r31 19 19 ComboBoxSize: TComboBox; 20 20 Label1: TLabel; 21 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 21 22 procedure FormCreate(Sender: TObject); 23 procedure FormShow(Sender: TObject); 22 24 private 23 25 … … 44 46 end; 45 47 48 procedure TFormNew.FormShow(Sender: TObject); 49 begin 50 Core.PersistentForm1.Load(Self); 51 end; 52 53 procedure TFormNew.FormClose(Sender: TObject; var CloseAction: TCloseAction); 54 begin 55 Core.PersistentForm1.Save(Self); 56 end; 57 46 58 procedure TFormNew.Load(Game: TGame); 47 59 begin
Note:
See TracChangeset
for help on using the changeset viewer.