1
2
3
4
5
6
7
8
9 package cz.cuni.amis.pogamut.defcon.communication.messages.infos;
10
11 import cz.cuni.amis.pogamut.base.communication.messages.*;
12 import cz.cuni.amis.pogamut.base.communication.worldview.*;
13 import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
14 import cz.cuni.amis.pogamut.defcon.base3d.worldview.object.DefConLocation;
15 import cz.cuni.amis.pogamut.defcon.communication.messages.*;
16 import cz.cuni.amis.pogamut.defcon.communication.messages.commands.*;
17 import cz.cuni.amis.pogamut.defcon.communication.messages.infos.*;
18 import cz.cuni.amis.pogamut.defcon.consts.*;
19 import cz.cuni.amis.pogamut.defcon.consts.state.*;
20 import cz.cuni.amis.utils.exception.*;
21
22 import java.util.*;
23
24 import javabot.*;
25
26
27
28
29
30 public class Sub extends DefConUnitObject<SubState> {
31
32
33
34 @Updatable
35 private int nukeSupply = 0;
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 public Sub(int id, int teamId, DefConLocation location, boolean visible, SubState state,
57 int stateCount, int target, int nukeSupply, double time) {
58 super(id, UnitType.SUB, teamId, location, visible, state, stateCount, target, time);
59
60 this.nukeSupply = nukeSupply;
61 }
62
63
64
65
66
67 public Sub(Sub original) {
68 super(original);
69
70 this.nukeSupply = original.nukeSupply;
71 }
72
73
74
75
76
77
78 public int getNukeSupply() {
79 return this.nukeSupply;
80 }
81
82
83
84
85
86
87 @Override
88 public String toString() {
89 return "Sub[" + getStringizedFields() + "; NukeSupply = " + this.nukeSupply + "]";
90 }
91
92
93
94
95
96
97 public String toHtmlString() {
98 return "<p><b>Sub:</b></p>" + "<p><i>NukeSupply:</i> " + this.nukeSupply + "</p>";
99 }
100 }