1
2
3
4
5
6
7
8
9 package cz.cuni.amis.pogamut.defcon.communication.messages.commands;
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 RequestAlliance extends DefConCommand {
31
32
33
34 private int teamId = 0;
35
36
37
38
39
40
41
42
43
44 public RequestAlliance(int teamId) {
45 this.teamId = teamId;
46 }
47
48
49
50
51
52 public RequestAlliance(RequestAlliance original) {
53 this.teamId = original.teamId;
54 }
55
56
57
58
59
60
61 public int getTeamId() {
62 return this.teamId;
63 }
64
65
66
67
68
69
70
71
72 public RequestAlliance setTeamId(int teamId) {
73 this.teamId = teamId;
74
75 return this;
76 }
77
78
79
80
81 @Override
82 public void perform() {
83 JBot.RequestAlliance(getTeamId());
84 }
85
86
87
88
89
90
91 @Override
92 public String toString() {
93 return "RequestAlliance[" + getStringizedFields() + "; TeamId = " + this.teamId + "]";
94 }
95
96
97
98
99
100
101 public String toHtmlString() {
102 return "<p><b>RequestAlliance:</b></p>" + "<p><i>TeamId:</i> " + this.teamId + "</p>";
103 }
104 }