Changeset 38 for trunk/Forms
- Timestamp:
- Oct 13, 2019, 5:34:57 PM (5 years ago)
- Location:
- trunk/Forms
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormComputer.lfm
r32 r38 32 32 TabOrder = 1 33 33 end 34 object TrackBar1: TTrackBar 35 Left = 24 36 Height = 58 37 Top = 104 38 Width = 430 39 Max = 1000 40 Position = 0 41 Anchors = [akTop, akLeft, akRight] 42 TabOrder = 2 43 end 44 object Label1: TLabel 45 Left = 21 46 Height = 26 47 Top = 76 48 Width = 127 49 Caption = 'Delay per step:' 50 ParentColor = False 51 end 34 52 end -
trunk/Forms/UFormComputer.lrj
r32 r38 2 2 {"hash":1113,"name":"tformcomputer.caption","sourcebytes":[65,73],"value":"AI"}, 3 3 {"hash":5941396,"name":"tformcomputer.buttonstart.caption","sourcebytes":[83,116,97,114,116],"value":"Start"}, 4 {"hash":371552,"name":"tformcomputer.buttonstop.caption","sourcebytes":[83,116,111,112],"value":"Stop"} 4 {"hash":371552,"name":"tformcomputer.buttonstop.caption","sourcebytes":[83,116,111,112],"value":"Stop"}, 5 {"hash":116494394,"name":"tformcomputer.label1.caption","sourcebytes":[68,101,108,97,121,32,112,101,114,32,115,116,101,112,58],"value":"Delay per step:"} 5 6 ]} -
trunk/Forms/UFormComputer.pas
r32 r38 6 6 7 7 uses 8 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, UGame, fgl; 8 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, 9 UGame, fgl; 9 10 10 11 type … … 30 31 ButtonStart: TButton; 31 32 ButtonStop: TButton; 33 Label1: TLabel; 34 TrackBar1: TTrackBar; 32 35 procedure ButtonStartClick(Sender: TObject); 33 36 procedure ButtonStopClick(Sender: TObject); … … 135 138 ); 136 139 begin 140 ButtonStopClick(Self); 137 141 Core.PersistentForm1.Save(Self); 138 142 end; … … 187 191 S := S + '), '; 188 192 end; 189 MoveAllAndUpdate(GameTries[0].Moves[0] );193 MoveAllAndUpdate(GameTries[0].Moves[0], False); 190 194 { if CanMergeDirection(drDown) then MoveAllAnimate(drDown) 191 195 else if CanMergeDirection(drRight) then MoveAllAnimate(drRight) … … 198 202 } 199 203 Application.ProcessMessages; 200 Sleep( 10);204 Sleep(TrackBar1.Position); 201 205 end; 202 206 end; … … 243 247 NewTry.Game.UndoEnabled := False; 244 248 NewTry.Game.AnimationDuration := 0; 245 NewTry.Game.MoveAll Animate(Direction);249 NewTry.Game.MoveAll(Direction, False); 246 250 SetLength(NewTry.Moves, Length(NewTry.Moves) + 1); 247 251 NewTry.Moves[Length(NewTry.Moves) - 1] := Direction; -
trunk/Forms/UFormMain.pas
r37 r38 57 57 if Core.Game.Running and not Core.Game.Moving then begin 58 58 case Key of 59 37: Core.Game.MoveAllAndUpdate(drLeft );60 38: Core.Game.MoveAllAndUpdate(drUp );61 39: Core.Game.MoveAllAndUpdate(drRight );62 40: Core.Game.MoveAllAndUpdate(drDown );59 37: Core.Game.MoveAllAndUpdate(drLeft, True); 60 38: Core.Game.MoveAllAndUpdate(drUp, True); 61 39: Core.Game.MoveAllAndUpdate(drRight, True); 62 40: Core.Game.MoveAllAndUpdate(drDown, True); 63 63 end; 64 64 end;
Note:
See TracChangeset
for help on using the changeset viewer.