Snake game implementation with canvas