Click here to Skip to main content
15,850,685 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone
I'm playing with the code of the snake game as part of learning.
As you can see on the [GOOGLE TRANSLATE LINK REMOVED] attached page, when the snake's head comes into contact with the body, we lose the game. This also happens when we click the left arrow while the snake moves to the right. I'm just learning and I don't know how to solve this problem so that the snake cannot fall back and end the game. I am happy to read something on this subject but I do not know where it will be simply described.
Maybe you also have some advice for beginners. I want to improve this code, add eating sound, points, maybe graphic design. I read that you need to write code to learn programming. I watched a [LINK DELETED] 4.5h tutorial explaining the basics of C # and I created a simple bank application but sorry, film how the program works is in Polish. I do not understand everything I write but I enjoy it. Maybe some books or other tutorials?
Soon I will read about:
Xamarin
SQL
and I'm thinking about Python

What I have tried:

Control.KeyDown Event (System.Windows.Forms) | Microsoft Docs[^]
Posted
Updated 6-Dec-19 1:27am
v3

1 solution

If you got the code from your YouTube tutorial link, then go back there and use the forum below the video to ask there; they will be familiar with their own software - and the tutorial - while we would have to watch the whole 4.5hr video to even start working out what you might have done wrong or be having problems with, and that's an unreasonable demand to make of volunteers.

And frankly, most YouTube tutorials aren't worth watching 4.5 minutes of, let alone 4.5 hours ...
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900