First of all great video i appreciate it. But i have a question. In the original snake game you lose the game by colliding with yourself (ex: smashing your head to your tail) too. Is it possible to implement this function to our game? I tried it but sadly i wasn't succesful. Game loads and waits for an innitial input to move but whenever i press something on keyboard it just finishes the game with 0 scores. I think this happens because we passed the values of the snake array to the next array index. Anyone with solution ?
when i use A W S D keys insted of the arrows its print me the letters under the game and when you press any other button the snake disapear? any solutions? also when you go in one direction and press the opposite key (going right and press left)the snake going left it shouldnt be like that
Any idea why whatever my snake passes it deletes whatever is on the right side of it? if i have an apple directly next to my snake on the right side and the snake moves past it the apple deletes anyway. I have been looking at my code for hours and cant figure it out.
Hello! Could u please send the code of the methode "paintsnake". Its not working by me. The parts of the snakes are not by the snake. They are flowing around the screen. TY
I can tell you what you have to correct. When you paint the body with the for loop you have to start at 1 this is how it should look else you are just overwriting the head :) //paint the body for(int i = 1; i < applesEaten + 1; i++) { Console.SetCursorPosition(xPositionIn[i], yPositionIn[i]); Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("o"); }
Hi! Can I get the source code? I tried making my own snake game but it is not working correctly and it would be nice to compare it to your code
i cant use the "appleXDim = random.Next(0+2, 70-2);" unless i place the Randomizer inside the "setApplePositionOnScreen"-method.
Did you define a random variable (1:44 44 into the video) and then pass the random variable into the method (2:15 into the video)?
First of all great video i appreciate it. But i have a question. In the original snake game you lose the game by colliding with yourself (ex: smashing your head to your tail) too. Is it possible to implement this function to our game? I tried it but sadly i wasn't succesful. Game loads and waits for an innitial input to move but whenever i press something on keyboard it just finishes the game with 0 scores. I think this happens because we passed the values of the snake array to the next array index. Anyone with solution ?
Awesome Sir. Sir please upload next lecture.
when i use A W S D keys insted of the arrows its print me the letters under the game and when you press any other button the snake disapear? any solutions?
also when you go in one direction and press the opposite key (going right and press left)the snake going left it shouldnt be like that
You’re not supposed to use W A S D, try using the arrow keys instead
thanks
Any idea why whatever my snake passes it deletes whatever is on the right side of it? if i have an apple directly next to my snake on the right side and the snake moves past it the apple deletes anyway. I have been looking at my code for hours and cant figure it out.
sir my food don't seen in a boundary
help me please
Hello! Could u please send the code of the methode "paintsnake". Its not working by me. The parts of the snakes are not by the snake. They are flowing around the screen. TY
I can tell you what you have to correct. When you paint the body with the for loop you have to start at 1 this is how it should look else you are just overwriting the head :)
//paint the body
for(int i = 1; i < applesEaten + 1; i++)
{
Console.SetCursorPosition(xPositionIn[i], yPositionIn[i]);
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("o");
}
Thank you...it really works..