Ignore:
Timestamp:
Oct 5, 2019, 12:17:17 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Tiles matrix moved to separate class called TBoard.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r12 r17  
    5959      40: MovedCount := Core.Game.MoveAll(drDown);
    6060    end;
    61     if MovedCount > 0 then Core.Game.FillRandomCell;
    62     if not Core.Game.CanMove and (Core.Game.GetEmptyCellsCount = 0) then
     61    if MovedCount > 0 then Core.Game.FillRandomTile;
     62    if not Core.Game.CanMove and (Core.Game.Board.GetEmptyTilesCount = 0) then
    6363      Core.Game.GameOver;
    64     if (not Core.Game.Won) and (Core.Game.GetHighestCellValue >= 2048) then
     64    if (not Core.Game.Won) and (Core.Game.Board.GetHighestTileValue >= 2048) then
    6565      Core.Game.Win;
    6666  end;
Note: See TracChangeset for help on using the changeset viewer.