MCPcopy Index your code
hub / github.com/battlecode/battlecode-2018 / start_game

Method start_game

battlecode-manager/server.py:198–212  ·  view source on GitHub ↗

This code handles starting the game. Anything that is meant to be triggered when a game starts is stored here.

(self)

Source from the content-addressed store, hash-verified

196 self.turn_events[player_index].set()
197
198 def start_game(self):
199 '''
200 This code handles starting the game. Anything that is meant to be
201 triggered when a game starts is stored here.
202 '''
203
204 if self.terminal_viewer and sys.platform != 'win32':
205 # Clear the entire screen
206 sys.stdout.write("\033[2J")
207
208 # Init the player who starts and then tell everyone we started
209 self.current_player_index = 0
210 self.set_player_turn(self.current_player_index)
211 self.started = True
212 return
213
214
215

Callers 3

verify_loginMethod · 0.95
test_controllerFunction · 0.45
__init__Method · 0.45

Calls 2

set_player_turnMethod · 0.95
writeMethod · 0.45

Tested by 1

test_controllerFunction · 0.36