DEV Community

Discussion on: Snake...in pure HTML⁉️ [no JS, no CSS, no images!!] 😱

Collapse
 
rajatkantinandi profile image
Rajat Kanti Nandi

Good concept. Although looking at the title I was wondering that how can a markup language handle a game logic. But looks like you used another language (php) and had the whole game state in the backend and serving static pages updated based on the game state. It feels like cheating but I guess technically you did not use any Javascript and had all the logic in the backend. Overall some good things to learn from here that urls can be powerful way to handle state of an application.

Collapse
 
grahamthedev profile image
GrahamTheDev

It may not be clear, but this is actually possible with just HTML (with each page a completely different game state), it was just I would need more files than there are atoms in the universe, so I used PHP to generate the next pages. 💗