blob: 91b1bd1c85b9827578853bd97a887e0f8e3ce87c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
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;
|