1 | unit Matter;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, Graphics, Generics.Collections;
|
---|
7 |
|
---|
8 | type
|
---|
9 | TMatterKind = (mkSpace, mkDirt, mkRock, mkBullet, mkTankBody,
|
---|
10 | mkHome, mkBorder);
|
---|
11 |
|
---|
12 | TMatterIndex = (miSpace, miDirt1, miDirt2, miRock, miBullet1, miBullet2, miBorder,
|
---|
13 | miPlayer1Cannon, miPlayer1Home, miPlayer1TankBody, miPlayer1TankBody2,
|
---|
14 | miPlayer2Cannon, miPlayer2Home, miPlayer2TankBody, miPlayer2TankBody2,
|
---|
15 | miPlayer3Cannon, miPlayer3Home, miPlayer3TankBody, miPlayer3TankBody2,
|
---|
16 | miPlayer4Cannon, miPlayer4Home, miPlayer4TankBody, miPlayer4TankBody2,
|
---|
17 | miPlayer5Cannon, miPlayer5Home, miPlayer5TankBody, miPlayer5TankBody2,
|
---|
18 | miPlayer6Cannon, miPlayer6Home, miPlayer6TankBody, miPlayer6TankBody2,
|
---|
19 | miPlayer7Cannon, miPlayer7Home, miPlayer7TankBody, miPlayer7TankBody2,
|
---|
20 | miPlayer8Cannon, miPlayer8Home, miPlayer8TankBody, miPlayer8TankBody2);
|
---|
21 |
|
---|
22 | { TMatter }
|
---|
23 |
|
---|
24 | TMatter = class
|
---|
25 | Kind: TMatterKind;
|
---|
26 | Player: Integer;
|
---|
27 | Color: TColor;
|
---|
28 | Diggable: Boolean;
|
---|
29 | Blocking: Boolean;
|
---|
30 | end;
|
---|
31 |
|
---|
32 | { TMatters }
|
---|
33 |
|
---|
34 | TMatters = class(TObjectList<TMatter>)
|
---|
35 | function AddNew: TMatter;
|
---|
36 | end;
|
---|
37 |
|
---|
38 |
|
---|
39 | implementation
|
---|
40 |
|
---|
41 | { TMatters }
|
---|
42 |
|
---|
43 | function TMatters.AddNew: TMatter;
|
---|
44 | begin
|
---|
45 | Result := TMatter.Create;
|
---|
46 | Add(Result);
|
---|
47 | end;
|
---|
48 |
|
---|
49 | end.
|
---|
50 |
|
---|