Changeset 7 for trunk/class/maze.pas


Ignore:
Timestamp:
Nov 22, 2012, 7:09:17 AM (10 years ago)
Author:
chronos
Message:
  • Added: Allow terminate solving process.
  • Fixed: Disable actions which can change maze during solving.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        33Lazes.lps
        44Lazes.dbg
         5Lazes
  • trunk/class/maze.pas

    r1 r7  
    8383
    8484    procedure ResetTags(const pValue: integer = 0);
     85    procedure ResetState;
    8586    function  GetCell(const pPosition: TCellPoint): TMazeCell;
    8687    function  StartCell: TMazeCell;
     
    211212
    212213procedure TMaze.ResetTags(const pValue: integer);
    213 var row,col: integer;
     214var
     215  row,col: integer;
    214216begin
    215217  for row := 0 to Height-1 do
    216218    for col := 0 to Width-1 do
    217       FMaze[row][col].Tag := pValue
     219      FMaze[row][col].Tag := pValue;
     220end;
     221
     222procedure TMaze.ResetState;
     223var
     224  row,col: integer;
     225begin
     226  for row := 0 to Height - 1 do
     227    for col := 0 to Width - 1 do
     228      FMaze[row, col].State := csEmpty;
    218229end;
    219230
Note: See TracChangeset for help on using the changeset viewer.