From 7cef684e71b64f00b41da66ba7bc581568d78f51 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sun, 6 Aug 2017 22:17:54 +1000 Subject: Factored out some trivial bits into Misc, made coding style more consistent --- src/squares.adb | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'src/squares.adb') diff --git a/src/squares.adb b/src/squares.adb index 673f425..91b1bd1 100644 --- a/src/squares.adb +++ b/src/squares.adb @@ -3,6 +3,18 @@ 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 @@ -21,8 +33,6 @@ package body Squares is end Get_Contents; - - procedure Set_Contents (This : in out Square; Item : in Things.Thing) is @@ -42,17 +52,5 @@ package body Squares is end Draw; - - - function "=" - (A, B : in Square) - return Boolean is - begin - return - A.Walkable = B.Walkable and - A.Self_Image = B.Self_Image; - end "="; - - end Squares; -- cgit