Seems to work fine on 1.26.
Is there a way to turn off debug messages?
There doesn't seem to be any food for the snake, and it can pass through itself.
This seems more like a system or a base for making maps using this engine, than a complete map.
May be it belongs in "map development", or if you are willing to let people use your engine, post the unprotected version as a spell/system.
Edit: pressing Escape stops with a delay during which you may press Escape again. Instead of resetting the game, it simply ends it with a victory.