Current ebiten also needs Layout meth to be implemented and some func deprecated. Maybe you should add specific version, that you used for this game :shrug:
Change direction before g.updateCounter check will make snake control more smooth
Duplicate code at g.score++ section. Looks like it there was food that can increase snake length for > 1 tiles, but code wasnt removed
g.speed was setted to 10 inside and outside restart func. Maybe it should be setted only inside restart func?
Anyway, nice game example! I like it! Thx :D
KS
Kirill Semenchenko
regular go developer "json to json to json to json to json to response"
Hi! Some little unsolicited code review from me)
Anyway, nice game example! I like it! Thx :D