-- Programmed by Jedidiah Barber -- Licensed under the Sunset License v1.0 -- See license.txt for further details with Things; private with Data, FLTK.Images.RGB.PNG; 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); private type Square is tagged record Walkable : Boolean; Contents : Things.Thing; Self_Image : access FLTK.Images.RGB.PNG.PNG_Image; end record; Void : constant Square := (Walkable => False, Contents => Things.Nothing, Self_Image => null); Wall : constant Square := (Walkable => False, Contents => Things.Nothing, Self_Image => Data.Wall_Image); Space : constant Square := (Walkable => False, Contents => Things.Nothing, Self_Image => Data.Space_Image); Empty : constant Square := (Walkable => True, Contents => Things.Nothing, Self_Image => Data.Empty_Image); Goal : constant Square := (Walkable => True, Contents => Things.Nothing, Self_Image => Data.Goal_Image); end Squares;