add versions to snakes and read it in server class

This commit is contained in:
2026-04-03 19:57:55 +02:00
parent 013ac98821
commit 0a3db6ba57
8 changed files with 499 additions and 444 deletions
+3
View File
@@ -6,6 +6,8 @@ import os
from snakes.TemplateSnake import TemplateSnake
class BestBattleSnake(TemplateSnake):
VERSION = "2.5.0"
DIRECTIONS = {
"up": (0, 1),
"down": (0, -1),
@@ -23,6 +25,7 @@ class BestBattleSnake(TemplateSnake):
def __init__(self):
super().__init__()
self.name = "BestBattleSnake"
self.version = self.VERSION
self.recent_heads = deque(maxlen=14)
self.last_move = None
self.last_game_id = None