add versions to snakes and read it in server class
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user