1
2
3
4
5
6
7
8
9
10
11
12 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
13
14
15
16
17
18
19
20
21
22
23
24 public class StartPlayers
25 extends CommandMessage
26 {
27
28
29
30 public static final String PROTOTYPE =
31 " {Humans False} {GBBots False} {UnrealBots False} ";
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 public StartPlayers(
55 Boolean Humans, Boolean GBBots, Boolean UnrealBots
56 ) {
57
58 this.Humans = Humans;
59
60 this.GBBots = GBBots;
61
62 this.UnrealBots = UnrealBots;
63
64 }
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81 public StartPlayers() {
82 }
83
84
85
86
87
88
89
90 public StartPlayers(StartPlayers original) {
91
92 this.Humans = original.Humans;
93
94 this.GBBots = original.GBBots;
95
96 this.UnrealBots = original.UnrealBots;
97
98 }
99
100
101
102
103
104
105 protected
106 Boolean Humans =
107
108 null
109 ;
110
111
112
113
114
115
116
117
118 public Boolean isHumans()
119
120 {
121 return
122 Humans;
123 }
124
125
126
127
128
129
130
131
132
133 public StartPlayers
134 setHumans(Boolean Humans)
135
136 {
137 this.Humans = Humans;
138 return this;
139 }
140
141
142
143
144
145
146 protected
147 Boolean GBBots =
148
149 null
150 ;
151
152
153
154
155
156
157
158
159 public Boolean isGBBots()
160
161 {
162 return
163 GBBots;
164 }
165
166
167
168
169
170
171
172
173
174 public StartPlayers
175 setGBBots(Boolean GBBots)
176
177 {
178 this.GBBots = GBBots;
179 return this;
180 }
181
182
183
184
185 protected
186 Boolean UnrealBots =
187
188 null
189 ;
190
191
192
193
194
195
196 public Boolean isUnrealBots()
197
198 {
199 return
200 UnrealBots;
201 }
202
203
204
205
206
207
208
209 public StartPlayers
210 setUnrealBots(Boolean UnrealBots)
211
212 {
213 this.UnrealBots = UnrealBots;
214 return this;
215 }
216
217 public String toString() {
218 return toMessage();
219 }
220
221 public String toHtmlString() {
222 return super.toString() + "[<br/>" +
223
224 "<b>Humans</b> = " +
225 String.valueOf(isHumans()
226 ) +
227 " <br/> " +
228
229 "<b>GBBots</b> = " +
230 String.valueOf(isGBBots()
231 ) +
232 " <br/> " +
233
234 "<b>UnrealBots</b> = " +
235 String.valueOf(isUnrealBots()
236 ) +
237 " <br/> " +
238
239 "<br/>]"
240 ;
241 }
242
243 public String toMessage() {
244 StringBuffer buf = new StringBuffer();
245 buf.append("STARTPLRS");
246
247 if (Humans != null) {
248 buf.append(" {Humans " + Humans + "}");
249 }
250
251 if (GBBots != null) {
252 buf.append(" {GBBots " + GBBots + "}");
253 }
254
255 if (UnrealBots != null) {
256 buf.append(" {UnrealBots " + UnrealBots + "}");
257 }
258
259 return buf.toString();
260 }
261
262
263
264
265
266 }
267