main #1

Merged
daniel156161 merged 15 commits from main into dev 2024-04-13 03:03:13 +02:00
3 changed files with 4 additions and 2 deletions
Showing only changes of commit 3aec07a7e7 - Show all commits
+1
View File
@@ -4,3 +4,4 @@ from snakes.AStarSnake import AStarSnake
from snakes.MasterSnake import MasterSnake
SNAKE = MasterSnake()
DEBUG = True
+1 -1
View File
@@ -45,7 +45,7 @@ def start(game_state: typing.Dict):
def move(game_state: typing.Dict) -> typing.Dict:
next_move = SNAKE.choose_move(game_state)
game_state_storage.add_moves(game_state["board"], next_move)
print("MOVE:", f"{next_move},", "Me:", {"body": game_state["you"]["body"], "head": game_state["you"]["head"], "length": game_state["you"]["length"]})
print("MOVE:", f"{next_move:5},", "Me:", {"head": game_state["you"]["head"], "length": game_state["you"]["length"]})
return {"move": next_move}
# end is called when your Battlesnake finishes a game
+2 -1
View File
@@ -2,6 +2,7 @@ import logging
import os
import typing
from config import DEBUG
from flask import Flask
from flask import request
@@ -42,4 +43,4 @@ def run_server(handlers: typing.Dict):
logging.getLogger("werkzeug").setLevel(logging.ERROR)
print(f"\nRunning Battlesnake at http://{host}:{port}")
app.run(host=host, port=port)
app.run(host=host, port=port, debug=DEBUG)