This repository has been archived by the owner on Dec 26, 2021. It is now read-only.
forked from Russian-AI-Cup-2015/pascal-cgdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayerControl.pas
80 lines (63 loc) · 1.45 KB
/
PlayerControl.pas
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
unit PlayerControl;
interface
uses
Math, TypeControl;
type
TPlayer = class
private
FId: Int64;
FMe: Boolean;
FName: String;
FStrategyCrashed: Boolean;
FScore: LongInt;
public
constructor Create(const id: Int64; const me: Boolean; const name: String; const strategyCrashed: Boolean;
const score: LongInt);
function GetId: Int64;
property Id: Int64 read GetId;
function GetMe: Boolean;
property IsMe: Boolean read GetMe;
function GetName: String;
property Name: String read GetName;
function GetStrategyCrashed: Boolean;
property IsStrategyCrashed: Boolean read GetStrategyCrashed;
function GetScore: LongInt;
property Score: LongInt read GetScore;
destructor Destroy; override;
end;
TPlayerArray = array of TPlayer;
implementation
constructor TPlayer.Create(const id: Int64; const me: Boolean; const name: String; const strategyCrashed: Boolean;
const score: LongInt);
begin
FId := id;
FMe := me;
FName := name;
FStrategyCrashed := strategyCrashed;
FScore := score;
end;
function TPlayer.GetId: Int64;
begin
result := FId;
end;
function TPlayer.GetMe: Boolean;
begin
result := FMe;
end;
function TPlayer.GetName: String;
begin
result := FName;
end;
function TPlayer.GetStrategyCrashed: Boolean;
begin
result := FStrategyCrashed;
end;
function TPlayer.GetScore: LongInt;
begin
result := FScore;
end;
destructor TPlayer.Destroy;
begin
inherited;
end;
end.