Pergunta de entrevista da empresa Humana

How to design a snake game

Resposta da entrevista

Sigiloso

5 de mar. de 2021

A snake game is really just a list of squares moving, the easiest way is to use HTML canvas and store each segment in a list of Tuples, then cycle through that list and move it to the correct location depending on where the user is moving. Only the head actually moves, while the rest of the segments just move to the last position of the segment before it.