Changeset 31 for trunk/Forms/UFormComputer.pas
- Timestamp:
- Oct 12, 2019, 10:47:02 PM (5 years ago)
- File:
-
- 1 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;
Note:
See TracChangeset
for help on using the changeset viewer.