1 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2
3
4 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.*;
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 public abstract class GameInfoStatic
30 extends InfoMessage
31 implements IStaticWorldObject
32
33 {
34
35
36
37
38
39
40 public GameInfoStatic()
41 {
42 }
43
44
45
46
47 public static final UnrealId GameInfoId = UnrealId.get("GameInfoId");
48
49
50 public UnrealId getId() {
51 return cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo.GameInfoId;
52 }
53
54
55 protected long SimTime;
56
57
58
59
60 @Override
61 public long getSimTime() {
62 return SimTime;
63 }
64
65
66
67
68 protected void setSimTime(long SimTime) {
69 this.SimTime = SimTime;
70 }
71
72
73 @Override
74 public abstract
75 GameInfoStatic clone();
76
77 @Override
78 public Class getCompositeClass() {
79 return GameInfo.class;
80 }
81
82
83
84
85
86
87
88
89
90 public abstract String getGametype()
91 ;
92
93
94
95
96 public abstract String getLevel()
97 ;
98
99
100
101
102
103
104
105
106 public abstract int getMaxTeams()
107 ;
108
109
110
111
112
113
114 public abstract Location getRedBaseLocation()
115 ;
116
117
118
119
120
121
122 public abstract Location getBlueBaseLocation()
123 ;
124
125
126
127
128
129
130 public abstract Location getFirstDomPointLocation()
131 ;
132
133
134
135
136
137
138 public abstract Location getSecondDomPointLocation()
139 ;
140
141
142
143
144
145
146 public abstract Location getFactoryLocation()
147 ;
148
149
150
151
152
153
154 public abstract double getFactoryRadius()
155 ;
156
157
158
159
160
161
162 public abstract Location getDisperserLocation()
163 ;
164
165
166
167
168
169
170 public abstract double getDisperserRadius()
171 ;
172
173
174
175
176
177
178 public abstract double getFactoryAdrenalineCount()
179 ;
180
181
182
183
184
185
186 public abstract String getFactorySpawnType()
187 ;
188
189
190 @Override
191 public boolean isDifferentFrom(IStaticWorldObject other)
192 {
193 if (other == null)
194 {
195 return true;
196 }
197 else if (other == this)
198 {
199 return false;
200 }
201 else
202 {
203 GameInfoStatic obj = (GameInfoStatic) other;
204
205
206 if ( !(
207 AdvancedEquals.equalsOrNull(this.getGametype()
208 , obj.getGametype()
209 )
210 ) )
211 {
212 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Gametype on object class GameInfoStatic");
213 return true;
214 }
215
216 if ( !(
217 AdvancedEquals.equalsOrNull(this.getLevel()
218 , obj.getLevel()
219 )
220 ) )
221 {
222 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Level on object class GameInfoStatic");
223 return true;
224 }
225
226 if ( !(this.getMaxTeams()
227
228 == obj.getMaxTeams()
229 ) )
230 {
231 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property MaxTeams on object class GameInfoStatic");
232 return true;
233 }
234
235 if ( !(
236 AdvancedEquals.equalsOrNull(this.getRedBaseLocation()
237 , obj.getRedBaseLocation()
238 )
239 ) )
240 {
241 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property RedBaseLocation on object class GameInfoStatic");
242 return true;
243 }
244
245 if ( !(
246 AdvancedEquals.equalsOrNull(this.getBlueBaseLocation()
247 , obj.getBlueBaseLocation()
248 )
249 ) )
250 {
251 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property BlueBaseLocation on object class GameInfoStatic");
252 return true;
253 }
254
255 if ( !(
256 AdvancedEquals.equalsOrNull(this.getFirstDomPointLocation()
257 , obj.getFirstDomPointLocation()
258 )
259 ) )
260 {
261 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property FirstDomPointLocation on object class GameInfoStatic");
262 return true;
263 }
264
265 if ( !(
266 AdvancedEquals.equalsOrNull(this.getSecondDomPointLocation()
267 , obj.getSecondDomPointLocation()
268 )
269 ) )
270 {
271 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property SecondDomPointLocation on object class GameInfoStatic");
272 return true;
273 }
274
275 if ( !(
276 AdvancedEquals.equalsOrNull(this.getFactoryLocation()
277 , obj.getFactoryLocation()
278 )
279 ) )
280 {
281 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property FactoryLocation on object class GameInfoStatic");
282 return true;
283 }
284
285 if ( !(this.getFactoryRadius()
286
287 == obj.getFactoryRadius()
288 ) )
289 {
290 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property FactoryRadius on object class GameInfoStatic");
291 return true;
292 }
293
294 if ( !(
295 AdvancedEquals.equalsOrNull(this.getDisperserLocation()
296 , obj.getDisperserLocation()
297 )
298 ) )
299 {
300 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property DisperserLocation on object class GameInfoStatic");
301 return true;
302 }
303
304 if ( !(this.getDisperserRadius()
305
306 == obj.getDisperserRadius()
307 ) )
308 {
309 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property DisperserRadius on object class GameInfoStatic");
310 return true;
311 }
312
313 if ( !(this.getFactoryAdrenalineCount()
314
315 == obj.getFactoryAdrenalineCount()
316 ) )
317 {
318 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property FactoryAdrenalineCount on object class GameInfoStatic");
319 return true;
320 }
321
322 if ( !(
323 AdvancedEquals.equalsOrNull(this.getFactorySpawnType()
324 , obj.getFactorySpawnType()
325 )
326 ) )
327 {
328 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property FactorySpawnType on object class GameInfoStatic");
329 return true;
330 }
331
332 }
333 return false;
334 }
335
336
337 public String toString() {
338 return
339 super.toString() + "[" +
340
341 "Gametype = " + String.valueOf(getGametype()
342 ) + " | " +
343
344 "Level = " + String.valueOf(getLevel()
345 ) + " | " +
346
347 "MaxTeams = " + String.valueOf(getMaxTeams()
348 ) + " | " +
349
350 "RedBaseLocation = " + String.valueOf(getRedBaseLocation()
351 ) + " | " +
352
353 "BlueBaseLocation = " + String.valueOf(getBlueBaseLocation()
354 ) + " | " +
355
356 "FirstDomPointLocation = " + String.valueOf(getFirstDomPointLocation()
357 ) + " | " +
358
359 "SecondDomPointLocation = " + String.valueOf(getSecondDomPointLocation()
360 ) + " | " +
361
362 "FactoryLocation = " + String.valueOf(getFactoryLocation()
363 ) + " | " +
364
365 "FactoryRadius = " + String.valueOf(getFactoryRadius()
366 ) + " | " +
367
368 "DisperserLocation = " + String.valueOf(getDisperserLocation()
369 ) + " | " +
370
371 "DisperserRadius = " + String.valueOf(getDisperserRadius()
372 ) + " | " +
373
374 "FactoryAdrenalineCount = " + String.valueOf(getFactoryAdrenalineCount()
375 ) + " | " +
376
377 "FactorySpawnType = " + String.valueOf(getFactorySpawnType()
378 ) + " | " +
379
380 "]";
381 }
382
383
384 public String toHtmlString() {
385 return super.toString() + "[<br/>" +
386
387 "<b>Gametype</b> = " + String.valueOf(getGametype()
388 ) + " <br/> " +
389
390 "<b>Level</b> = " + String.valueOf(getLevel()
391 ) + " <br/> " +
392
393 "<b>MaxTeams</b> = " + String.valueOf(getMaxTeams()
394 ) + " <br/> " +
395
396 "<b>RedBaseLocation</b> = " + String.valueOf(getRedBaseLocation()
397 ) + " <br/> " +
398
399 "<b>BlueBaseLocation</b> = " + String.valueOf(getBlueBaseLocation()
400 ) + " <br/> " +
401
402 "<b>FirstDomPointLocation</b> = " + String.valueOf(getFirstDomPointLocation()
403 ) + " <br/> " +
404
405 "<b>SecondDomPointLocation</b> = " + String.valueOf(getSecondDomPointLocation()
406 ) + " <br/> " +
407
408 "<b>FactoryLocation</b> = " + String.valueOf(getFactoryLocation()
409 ) + " <br/> " +
410
411 "<b>FactoryRadius</b> = " + String.valueOf(getFactoryRadius()
412 ) + " <br/> " +
413
414 "<b>DisperserLocation</b> = " + String.valueOf(getDisperserLocation()
415 ) + " <br/> " +
416
417 "<b>DisperserRadius</b> = " + String.valueOf(getDisperserRadius()
418 ) + " <br/> " +
419
420 "<b>FactoryAdrenalineCount</b> = " + String.valueOf(getFactoryAdrenalineCount()
421 ) + " <br/> " +
422
423 "<b>FactorySpawnType</b> = " + String.valueOf(getFactorySpawnType()
424 ) + " <br/> " +
425
426 "<br/>]";
427 }
428
429
430
431
432
433
434
435
436
437
438 }
439