summaryrefslogtreecommitdiff
path: root/src/squares.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/squares.ads')
-rw-r--r--src/squares.ads25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/squares.ads b/src/squares.ads
index 7f9b090..5aed2fb 100644
--- a/src/squares.ads
+++ b/src/squares.ads
@@ -7,8 +7,7 @@ with
private with
FLTK.Images.RGB.PNG,
- Ada.Command_Line,
- Ada.Directories;
+ Misc;
package Squares is
@@ -16,43 +15,45 @@ package Squares is
type Square is tagged private;
-
Void : constant Square;
-
Wall : constant Square;
Space : constant Square;
Empty : constant Square;
Goal : constant Square;
+ function "="
+ (A, B : in Square)
+ return Boolean;
+
+
+
function Is_Walkable
(This : in Square)
return Boolean;
+
+
function Get_Contents
(This : in Square)
return Things.Thing
with Pre => Is_Walkable (This);
-
procedure Set_Contents
(This : in out Square;
Item : in Things.Thing)
with Pre => Is_Walkable (This);
+
+
procedure Draw
(This : in Square;
X, Y : in Integer);
- function "="
- (A, B : in Square)
- return Boolean;
-
-
private
@@ -63,9 +64,7 @@ private
end record;
- Origin : String := Ada.Directories.Containing_Directory
- (Ada.Directories.Full_Name (Ada.Command_Line.Command_Name));
- Image_Dir : String := Origin & "/../share/sokoban/img";
+ Image_Dir : String := Misc.Origin & "/../share/sokoban/img";
Wall_Image : aliased FLTK.Images.RGB.PNG.PNG_Image :=