$begingroup$

I used to be excited about find out how to implement snake at the moment, particularly, how to make sure the snake strikes optimally from one goal to the subsequent.

This looks as if a shortest path downside, however it is a bit difficult as a result of you must maintain observe of the snake’s physique positions for each node within the BFS traversal, which may take up plenty of reminiscence. Is there a greater method than what I am envisioning right here?

atl123 is a brand new contributor to this web site. Take care in asking for clarification, commenting, and answering.
Try our Code of Conduct.

$endgroup$

0