Everlaw Interview Question

coding challenge (snake game on codesandbox)