Changeset 37 for trunk/UGame.pas
- Timestamp:
- Oct 13, 2019, 5:20:58 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r36 r37 152 152 ); 153 153 DirectionText: array[TMoveDirection] of string = ('None', 'Left', 'Up', 'Right', 'Down'); 154 InitialTileCount = 2; 154 155 155 156 resourcestring … … 482 483 Result := EmptyTiles[Random(EmptyTiles.Count)]; 483 484 Result.Value := NewValue; 484 if RecordHistory then begin485 SetLength(History.InitialTilesPos, Length(History.InitialTilesPos) + 1);486 History.InitialTilesPos[Length(History.InitialTilesPos) - 1] := Result.Index;487 end;488 485 end; 489 486 EmptyTiles.Free; … … 529 526 Running := True; 530 527 History.Clear; 531 for I := 0 to 1 do 532 FillRandomTile(0); 528 if RecordHistory then begin 529 for I := 0 to InitialTileCount - 1 do begin 530 SetLength(History.InitialTilesPos, Length(History.InitialTilesPos) + 1); 531 History.InitialTilesPos[Length(History.InitialTilesPos) - 1] := FillRandomTile(0).Index; 532 end; 533 end else begin 534 for I := 0 to InitialTileCount - 1 do 535 FillRandomTile(0); 536 end; 533 537 DoChange; 534 538 end;
Note:
See TracChangeset
for help on using the changeset viewer.