# Coding the Classic Game Snake in a Nut Shell (CC)!!!!

Hey Guys, i need your opinions on what i should create, Timelapses, Explaining the Code in a NutShell , Or completely Explaining it. Post your opinions in the comments please, ill read them all π Also Post your ideas of classic games in the comments and ill (attempt) to create them π Here’s 1 minute of me playing my own game ;P, then ill preview the code at 1:43 Your Still here , your nice ;_; thank you I’m Suprized you did’nt click off , i going to tell you a secret, i wub you c; The Code Editor that im using is called Brackets and you can get it from http://brackets.io/ links in desc also The Game Works by a process i created and call location history This game works on a grid that is 1000px by 1000px and 100px is equal to one stud on the grid the game saves the Positions of the player corresponding to the grid, an X array and a Y array ex. (0, 0) , (100, 500) Each time the player moves he/she adds 1 to a variable called the playermoves And if the value of this variable is>5 , it creates another variable called snakeEndPoint that takes the first set of Positions X and Y from the arrays and deletes it This Creates a absolute length for the snake. As For the Food i chose Cherries , the Cherrie has a random x and y values from an array with these values [0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000] Now if the player X and Y positions equal the Cerries X and Y positions then delete the cherrie an subtract 1 from the snakeEndPoint, Making the snake grow ;3 I’ll go more in detail if you guys want me to. Please Like and Subscribe and Dont forget to leave your opinion π

## One thought on “Coding the Classic Game Snake in a Nut Shell (CC)!!!!”

1. Brookelynn McGeorge says:

Could you explain the code? π