-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstubs.py
More file actions
209 lines (176 loc) · 4.62 KB
/
stubs.py
File metadata and controls
209 lines (176 loc) · 4.62 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
from engine.utility import BotInfo, Direction, LocationInfo, ResourceInfo, Team, Location, BotType
def get_round_number() -> int:
"""
Returns the current round number
"""
pass
def get_map_size() -> tuple[int, int]:
"""
Returns a tuple for the height and width of the current map
"""
pass
def get_id() -> int:
"""
Returns the unique identifier for this bot
"""
pass
def get_team() -> Team:
"""
Returns this bot's team
"""
pass
def get_location() -> Location:
"""
Returns this bot's current location
"""
pass
def get_hp() -> int:
"""
Returns this bot's current hp
"""
pass
def get_type() -> BotType:
"""
Returns this bot's type
"""
pass
def get_team_resources() -> int:
"""
Returns the total amount of resources that this bot's
team has.
"""
pass
def is_on_map(location : Location) -> bool:
"""
Returns true if the given location is on the map, or false
if the location is outside the map.
"""
pass
def can_sense_location(location : Location) -> bool:
"""
Returns true if the bot can sense the given location, or false
if the location cannot be sensed by the bot.
"""
pass
def sense_location(location : Location) -> LocationInfo:
"""
Returns information about the location if it can be sensed.
Return None if the location cannot be sensed.
"""
pass
def is_action_ready() -> bool:
"""
Returns true if the bot can act, or false otherwise.
"""
pass
def is_movement_ready() -> bool:
"""
Returns true if the bot can move, or false otherwise.
"""
pass
def can_sense_bot_at_location(location : Location) -> bool:
"""
Returns true if the bot can sense information about other bots at
the given location, or false if the location cannot be sensed.
"""
pass
def sense_bot_at_location(location : Location) -> BotInfo:
"""
Returns information about the bot at the given location, if a bot is present.
Returns None if no bot is present or the location cannot be sensed.
"""
pass
def sense_bots_in_range(team : Team, r : int = -1) -> list[BotInfo]:
"""
Returns a list of information entries about bots that can be sensed that are
on the given team and are within r squared units of the current bot. If r = -1, r
is ignored.
"""
pass
def can_attack(location : Location) -> bool:
"""
Returns true if the bot can attack the given location, or false otherwise.
"""
pass
def attack(location : Location):
"""
Attack the given location if possible.
"""
pass
def can_move(dir : Direction) -> bool:
"""
Returns true if the bot can move in the given direction, or false otherwise.
"""
pass
def move(dir : Direction):
"""
Move in the given direction if possible
"""
pass
def can_take_resources(location : Location) -> bool:
"""
Returns true if the bot can attempt to take resources from the given location,
or false otherwise.
"""
pass
def take_resources(location : Location):
"""
Attempt to take resources from the given location if possible.
"""
pass
def can_build_bot(location : Location, type : BotType) -> bool:
"""
Returns true if the bot can create another bot of the given type in the
given location, or false otherwise.
"""
pass
def build_bot(location : Location, type : BotType):
"""
Build a bot of the given type in the given location if possible.
"""
pass
def can_read_comms(i : int) -> bool:
"""
Returns true if the bot can read the given index in the communications array,
or false otherwise
"""
pass
def read_comms(i : int) -> int:
"""
Returns the value stored in the given index in the communcations array.
Returns None if the given index cannot be read.
"""
pass
def can_write_comms(i : int, val : int) -> bool:
"""
Returns true if the bot can write the given val at
the given index in the communications array, or false otherwise
"""
pass
def write_comms(i : int, val : int):
"""
Write the given val into the given index in the communcations array
if possible.
"""
pass
def get_resources(r : int = -1) -> list[ResourceInfo]:
"""
Returns a list of information entries about all the resources
the bot can currently sense.
"""
pass
def set_indicator_string(s : str):
"""
Set the value of the bot's indicator string, used for debugging.
"""
pass
def disintegrate():
"""
Destroy this bot.
"""
pass
def resign():
"""
Forfeit the round.
"""
pass