Got the starter snake going
This commit is contained in:
@@ -4,9 +4,10 @@ import typing
|
||||
class Snake:
|
||||
|
||||
SNAKES: typing.Dict[str, typing.Type["Snake"]] = {}
|
||||
name = "snake"
|
||||
|
||||
def __init_subclass__(cls) -> None:
|
||||
cls.SNAKES[cls.__name__] = cls
|
||||
cls.SNAKES[cls.name] = cls
|
||||
|
||||
def info(self) -> typing.Dict:
|
||||
'''info is called when you create your Battlesnake on play.battlesnake.com
|
||||
|
||||
@@ -8,6 +8,8 @@ from .snake import Snake
|
||||
class StarterSnake(Snake):
|
||||
'''Snake from Battlesnake's starter snake repo'''
|
||||
|
||||
name = "starter_snake"
|
||||
|
||||
def info(self) -> typing.Dict:
|
||||
print("INFO")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user