BCSnake - 292 bytes
py3/SDL2
jo
(josmiley)
from pygame import*;d=display;y,D,S=s=[15,16,17];n,p,x=D,99,d.set_mode([225]*2).fill while s.count(S)%2*S%n*(S&240): if e:=event.get(768):D=(e[0].key%4*17+15)%49-n;event.get() s=s[p!=S:]+[S+D];x(-1) if p==S:p=s[0] for i in[p]+s:x(0,((i-1)%n*y,(i-n)//n*y,y,y)) d.flip();S+=D;time.wait(99)
Changes
Links
- Home Page
- https://www.pygame.org/project/5534
Releases
BCSnake 292 bytes — 2 May, 2021