--  Programmed by Jedidiah Barber
--  Licensed under the Sunset License v1.0

--  See license.txt for further details


package body Squares is


    function "="
           (A, B : in Square)
        return Boolean is
    begin
        return
            A.Walkable = B.Walkable and
            A.Self_Image = B.Self_Image;
    end "=";




    function Is_Walkable
           (This : in Square)
        return Boolean is
    begin
        return This.Walkable;
    end Is_Walkable;




    function Get_Contents
           (This : in Square)
        return Things.Thing is
    begin
        return This.Contents;
    end Get_Contents;


    procedure Set_Contents
           (This : in out Square;
            Item : in     Things.Thing) is
    begin
        This.Contents := Item;
    end Set_Contents;




    procedure Draw
           (This : in Square;
            X, Y : in Integer) is
    begin
        This.Self_Image.Draw (X, Y);
        This.Contents.Draw (X, Y);
    end Draw;


end Squares;