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
+4
View File
@@ -2,9 +2,13 @@ from server.GameBoard import GameBoard
import random
class TemplateSnake:
VERSION = "1.0.0"
def __init__(self):
self.history = []
self.target_food = None
self.name = self.__class__.__name__
self.version = getattr(self, "VERSION", "1.0.0")
def clear_history(self):
self.history = []