Last change
on this file was 4, checked in by chronos, 11 years ago |
- Reorganized project directory structure.
- Created Lazarus package from generic maze classes.
|
File size:
1.6 KB
|
Line | |
---|
1 | {
|
---|
2 | Global declarations for the Lazarus Mazes program
|
---|
3 |
|
---|
4 | Copyright (C) 2012 G.A. Nijland (eny @ lazarus forum http://www.lazarus.freepascal.org/)
|
---|
5 |
|
---|
6 | This source is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
|
---|
7 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
|
---|
8 | version.
|
---|
9 |
|
---|
10 | This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
---|
11 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
---|
12 | details.
|
---|
13 |
|
---|
14 | A copy of the GNU General Public License is available on the World Wide Web at
|
---|
15 | <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing to the Free Software Foundation, Inc., 59
|
---|
16 | Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
---|
17 | }
|
---|
18 | unit LazesGlobals;
|
---|
19 |
|
---|
20 | {$mode delphi}{$H+}
|
---|
21 |
|
---|
22 | interface
|
---|
23 |
|
---|
24 | const
|
---|
25 | // Maximum width/height of the maze
|
---|
26 | C_MIN_MAZE_SIZE = 4;
|
---|
27 | C_MAX_MAZE_SIZE = 80;
|
---|
28 |
|
---|
29 | type
|
---|
30 | // Record structure to send messages around with maze metrics
|
---|
31 |
|
---|
32 | { TMazeUpdateInfo }
|
---|
33 |
|
---|
34 | TMazeUpdateInfo = record
|
---|
35 | MazeWidth : integer;
|
---|
36 | MazeHeight: integer;
|
---|
37 | DrawWidth : integer;
|
---|
38 | DrawHeight: integer;
|
---|
39 | class operator Equal(A, B: TMazeUpdateInfo): Boolean;
|
---|
40 | end;
|
---|
41 | PMazeUpdateInfo = ^TMazeUpdateInfo;
|
---|
42 |
|
---|
43 | implementation
|
---|
44 |
|
---|
45 | { TMazeUpdateInfo }
|
---|
46 |
|
---|
47 | class operator TMazeUpdateInfo.Equal(A, B: TMazeUpdateInfo): Boolean;
|
---|
48 | begin
|
---|
49 | Result := (A.MazeHeight = B.MazeHeight) and (A.MazeWidth = B.MazeWidth) and
|
---|
50 | (A.DrawHeight = B.DrawHeight) and (A.DrawWidth = B.DrawWidth);
|
---|
51 | end;
|
---|
52 |
|
---|
53 | end.
|
---|
54 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.