- Timestamp:
- Sep 28, 2014, 9:21:26 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r71 r72 171 171 AToolBarBigIcons.Checked := GetValue(Path + '/LargeIcons', False); 172 172 AToolBarVisible.Checked := GetValue(Path + '/ToolBarVisible', True); 173 AStatusBarVisible.Checked := GetValue(Path + '/StatusBarVisible', True);173 AStatusBarVisible.Checked := GetValue(Path + '/StatusBarVisible', False); 174 174 end; 175 175 end; -
trunk/Forms/UFormMove.lfm
r59 r72 9 9 ClientWidth = 320 10 10 OnCreate = FormCreate 11 OnKeyPress = FormKeyPress 11 12 OnShow = FormShow 12 LCLVersion = '1. 0.10.0'13 LCLVersion = '1.3' 13 14 object SpinEditOnce: TSpinEdit 14 15 Left = 208 15 Height = 2716 Height = 32 16 17 Top = 32 17 18 Width = 98 18 19 OnChange = SpinEditOnceChange 20 OnKeyPress = FormKeyPress 19 21 TabOrder = 0 20 22 end 21 23 object Label1: TLabel 22 24 Left = 24 23 Height = 1825 Height = 22 24 26 Top = 32 25 Width = 3627 Width = 46 26 28 Caption = 'Once:' 27 29 ParentColor = False 28 30 end 29 31 object ButtonOk: TButton 30 Left = 18 432 Left = 189 31 33 Height = 25 32 34 Top = 224 … … 48 50 object Label2: TLabel 49 51 Left = 24 50 Height = 1852 Height = 22 51 53 Top = 136 52 Width = 6654 Width = 87 53 55 Caption = 'Every turn:' 54 56 ParentColor = False … … 56 58 object SpinEditRepeat: TSpinEdit 57 59 Left = 208 58 Height = 2760 Height = 32 59 61 Top = 128 60 62 Width = 98 61 63 OnChange = SpinEditRepeatChange 64 OnKeyPress = FormKeyPress 62 65 TabOrder = 3 63 66 end … … 72 75 TickStyle = tsNone 73 76 Anchors = [akTop, akLeft, akRight] 77 OnKeyPress = FormKeyPress 74 78 TabOrder = 4 75 79 end … … 84 88 TickStyle = tsNone 85 89 Anchors = [akTop, akLeft, akRight] 90 OnKeyPress = FormKeyPress 86 91 TabOrder = 5 87 92 end … … 126 131 object Label3: TLabel 127 132 Left = 16 128 Height = 18133 Height = 22 129 134 Top = 8 130 Width = 96135 Width = 127 131 136 Caption = 'Win probability:' 132 137 ParentColor = False … … 134 139 object LabelWinProbability: TLabel 135 140 Left = 232 136 Height = 18141 Height = 22 137 142 Top = 8 138 Width = 1 0143 Width = 15 139 144 Caption = ' ' 140 145 ParentColor = False -
trunk/Forms/UFormMove.pas
r63 r72 33 33 procedure ButtonOnceMinClick(Sender: TObject); 34 34 procedure ButtonRepeatMaxClick(Sender: TObject); 35 procedure FormKeyPress(Sender: TObject; var Key: char); 35 36 procedure FormShow(Sender: TObject); 36 37 procedure SpinEditOnceChange(Sender: TObject); … … 89 90 procedure TFormMove.FormShow(Sender: TObject); 90 91 begin 91 ButtonOk.SetFocus;92 SpinEditOnce.SetFocus; 92 93 UpdateView; 93 94 end; … … 118 119 end; 119 120 121 procedure TFormMove.FormKeyPress(Sender: TObject; var Key: char); 122 begin 123 if Key = #13 then ButtonOk.Click; 124 if Key = #27 then ButtonCancel.Click; 125 end; 126 120 127 procedure TFormMove.SpinEditRepeatChange(Sender: TObject); 121 128 begin -
trunk/UCore.pas
r68 r72 81 81 procedure TCore.DoOnMove(CellFrom, CellTo: TCell; var CountOnce, 82 82 CountRepeat: Integer; Update: Boolean; var Confirm: Boolean); 83 var 84 I: Integer; 83 85 begin 84 86 if Update then FormMove.SpinEditOnce.MaxValue := CellFrom.GetAvialPower + CountOnce … … 92 94 FormMove.TrackBarRepeat.Position := FormMove.SpinEditRepeat.Value; 93 95 FormMove.DefendCount := CellTo.Power; 94 FormMove.AttackCount := CellTo.GetAttackPower; 96 // Attack count from other surrounding cells without current move if already exists 97 FormMove.AttackCount := 0; 98 for I := 0 to CellTo.MovesTo.Count - 1 do 99 if TUnitMove(CellTo.MovesTo[I]).CellFrom <> CellFrom then 100 FormMove.AttackCount := FormMove.AttackCount + TUnitMove(CellTo.MovesTo[I]).CountOnce; 95 101 FormMove.ShowWinProbability := CellTo.Player <> CellFrom.Player; 102 96 103 if FormMove.ShowModal = mrOk then begin 97 104 CountOnce := FormMove.SpinEditOnce.Value; -
trunk/UGame.pas
r71 r72 1487 1487 end else Result := 1; 1488 1488 if DefendCount = 0 then Exit; 1489 if Depth > 5 then Exit; 1489 // TODO: Limiting depth is not solving problem with probability of high near 1490 // numbers like 96 vs. 92. Complexity of calculation should be simplified 1491 // in different way 1492 if Depth > 10 then Exit; 1490 1493 1491 1494 OA := Min(AttackCount, 3);
Note:
See TracChangeset
for help on using the changeset viewer.