def start(): data = bottle.request.json print(json.dumps(data)) color = "#00FFFF" return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ global globalList inLoop = False foodTrapped = False spawn_xy = [0, 0] move_history = [] tail_loop_ready = False you = data['you'] you_id = you['id'] element = [ you_id, spawn_xy, inLoop, foodTrapped, move_history, tail_loop_ready ] globalList.append(element) color = "#FFC9F7" head = "bendr" tail = "fat-rattle" print(globalList) return start_response(color, head, tail)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ return start_response()
def start(): start = { 'color': '#ffcc00', 'headType': 'safe', 'tailType': 'round-bum', } return start_response(start)
def start(): data = bottle.request.json color = "#420666" name = "Joel" headType = "pixel" tailType = "pixel" return start_response(color, name, headType, tailType)
def start(): data = bottle.request.json #print(json.dumps(data)) color = '#42d1ab' headType = 'evil' tailType = 'bolt' return start_response(color, headType, tailType)
def start(): data = bottle.request.json color = "#00FF00" # Training requires one games played sequentially one at a time this # filters unwanted games. if data != None: if envi.getCurrentGame() == "" and envi.getCurrentSnake() == "" and \ data["board"]["width"] in [7, 11, 19] and data["board"]["height"] in [7, 11, 19]: envi.setCurrentGameParams(data["game"]["id"], data["you"]["id"]) return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ #print(json.dumps(data)) return start_response("#33BEFF", "bwc-scarf", "bwc-ice-skate")
def start(): data = bottle.request.json print(json.dumps(data)) color = "#8B0000" head_type = "dead" tail_type = "sharp" return start_response(color, head_type, tail_type)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ print(json.dumps(data)) color = "#00FF00" return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ state = converter.get_game_state(data) color = "#000088" return start_response(color)
def start(): print('in start------------------------------------------------------') data = bottle.request.json print(json.dumps(data)) color = "#736CCB" print('exiting start------------------------------------------------') return start_response(color)
def start(): data = bottle.request.json global game game = A(data["you"], data["board"]["height"], data["board"]["width"], data["board"]["snakes"], data["board"]["food"]) # print(json.dumps(data)) color = "#e74c3c" return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ color = "#6B5B95" headType = "silly" tailType = "freckled" return start_response(color, headType, tailType)
def start(): data = bottle.request.json #This adds a new game as an object to the list of games. GAMES.append(new_game(data)) # print(json.dumps(data)) color = "#E6009C" print(len(GAMES)) return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ color = "#9933ff" headtype = "pixel" tailtype = "pixel" return start_response(color, headtype, tailtype)
def start(): data = bottle.request.json grid = load(data) # printgrid(grid) """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ color = "#000550" #print(json.dumps(data, indent=4)) return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ # print(json.dumps(data)) color = "#ffcccc" headType = "silly" tailType = "bolt" return start_response(color, headType, tailType)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ print(json.dumps(data)) r = lambda: random.randint(0, 255) color = "#%02X%02X%02X" % (r(), r(), r()) return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ global game game = Game(data) color = "#196dff" headType = "dead" tailType = "hook" return start_response(color, headType, tailType)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ print "\n", "*-" * 5, 'START GAME', "-*" * 5, "\n" print(json.dumps(data)) games[data['game']['id']] = data color = "#FC3EC5" return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI initialize your snake state here using the request's data if necessary. """ #print(json.dumps(data)) color = '#123456' headType = 'fang' return start_response(color, headType)
def start(): data = bottle.request.json global first_move, snakeColor first_move = True """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ print(json.dumps(data)) color = snakeColor return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ print(json.dumps(data)) #data['headType'] = 'bwc-earmuffs' #data['tailType'] = 'bwc-ice-skate' #data['color'] = '#add8e6' color = "#add8e6" return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ # color = "#efefef" color = "#EE74F6" head = "bendr" tail = "fat-rattle" return start_response(color, head, tail)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ # print(json.dumps(data)) # See https://docs.battlesnake.com/snake-customization for customizations color = '#8A2BE2' headType = 'sand-worm' tailType = 'bolt' return start_response(color, headType, tailType)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ print(json.dumps(data)) color = "#000000" head = "smile" tail = "regular" return start_response( color, head, tail ) #not sure if it's okay to return 3 parameters. It was initially: return start_response(color)
def start(): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ print("start part") print("================\n") # print(json.dumps(data)) color = "#ff0000" headType = "silly" tailType = "freckled" return start_response(color, headType, tailType)
def start(): global arena global snake_color data = bottle.request.json # Set the arena bounds, which don't change after the start of the game. arena = get_arena_bounds(data) """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ print(json.dumps(data)) return start_response(snake_color)
def start(self): data = bottle.request.json """ TODO: If you intend to have a stateful snake AI, initialize your snake state here using the request's data if necessary. """ print(json.dumps(data)) #self.battlesnake.start(data) print("Snek Started") #action, _, _, _ = self.battlesnake.act(data) color = "#342D7E" return start_response(color)