typo
use requestAnimationFrame
kill snakes on disconnection