Ignore:
Timestamp:
Dec 9, 2024, 8:54:41 PM (13 days ago)
Author:
chronos
Message:
  • Added: Optionally generated unmergeable movable tiles.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormNew.pas

    r105 r106  
    1919    Label1: TLabel;
    2020    Label2: TLabel;
     21    Label3: TLabel;
    2122    ScrollBox1: TScrollBox;
    2223    SpinEditDisabledTiles: TSpinEdit;
     24    SpinEditUnmergeableTiles: TSpinEdit;
    2325    procedure ComboBoxSizeChange(Sender: TObject);
    2426  public
     
    4143
    4244procedure TFormNew.UpdateInterface;
     45var
     46  MaxDisabledTiles: Integer;
    4347begin
    44   SpinEditDisabledTiles.MaxValue := ComboBoxSize.ItemIndex + 2;
     48  MaxDisabledTiles := ComboBoxSize.ItemIndex + 2;
     49  MaxDisabledTiles := MaxDisabledTiles * MaxDisabledTiles - 3;
     50  SpinEditDisabledTiles.MaxValue := MaxDisabledTiles;
     51  SpinEditUnmergeableTiles.MaxValue := MaxDisabledTiles;
    4552end;
    4653
     
    5158  CheckBoxRecordHistory.Checked := Game.RecordHistory;
    5259  SpinEditDisabledTiles.Value := Game.DisabledTilesCount;
     60  SpinEditUnmergeableTiles.Value := Game.UnmergeableTilesCount;
    5361  UpdateInterface;
    5462end;
     
    6068  Game.RecordHistory := CheckBoxRecordHistory.Checked;
    6169  Game.DisabledTilesCount := SpinEditDisabledTiles.Value;
     70  Game.UnmergeableTilesCount := SpinEditUnmergeableTiles.Value;
    6271end;
    6372
Note: See TracChangeset for help on using the changeset viewer.