We are writing a snake game in javascript. Write a memory structure with constants for 5 colors. The usage should be for example color = Color.Red;. Write a Point2D class that has members X and Y. Write a Snake class that has members Point2D Position and Point2D Direction. Write a game loop that instantiates a Snake object and sets the Position to middle of canvas and Direction to the right. The game loop should accept wasd key inputs to change the direction of the snake. Write the logic to spawn a Food object with a Position member. The goal is to collide the snake with the Food, when collision is detected the Food should be deleted and spawn in a random position on the canvas. Write the draw function to draw the snake and food and update it every frame. The sleep delay between frames should be 30 milliseconds.