In order to get useful answers, you have to explain what is supposed to be your snake game, so that we have an idea of what you want.
Do you want to recreate a SnakeByte?
Snake Byte [Plums: 0] ATARI 800 (8-Bit) - 540 - YouTube[
^]
Quote:
Ive tried changing the direction of the snake but cant figure it out
This mean nothing to us, remember that we are not in your head, we are not NSA and we have no mind reading potion.
Explain what is this game, its requirements.
Give details of what is wrong and what you tried.
[Update]
Quote:
Yes it is a game similar to SnakeByte just trying to make classic snake but I'm a having a problem with getting the the direction of the snake to change
You have a problem in your code, it allow the snake to do a U turn which is impossible.
Note that SnakeByte was using 2 keys, turn left and turn right.
When I run your code, the snake head follow the directions I type, can you give more details about your problem.
A snake is a head, a body ans a tail, your code only handle the head.
SnakeByte was using a 2d array to remember the position of everything. This allowed to handle the snake body for any path and any length.