Today I built a simple snake game in C++ programing language around 20 minutes.
19.03.2023
17 Comments
I am about halfway and it is working fine, but I still don't understand WHAT the lines of code are doing. I am doing this to learn, but I still don't get it. For example, why am I writing rand() % height? How does that give the "correct" random location of the fruit? Why is "if(j == 0 || j == width – 1){" the width MINUS one? I don't get it.
0:51 i really said, and iostream, you added iostream, i said and conio.h XD, and you added conio.h, i said graphics.h, wait nono i think it would be windows.h, you added windows.h
hey, i followed everything, have not a single error in my code and my snake just wont eat the fruit, i am a total beginner on coding and wanted to follow along to get a better understanding, i am using windowsvisual studio 2022,
I am about halfway and it is working fine, but I still don't understand WHAT the lines of code are doing. I am doing this to learn, but I still don't get it. For example, why am I writing rand() % height? How does that give the "correct" random location of the fruit? Why is "if(j == 0 || j == width – 1){" the width MINUS one? I don't get it.
This tutorial is identical to another one on YouTube. Search: C++ Tutorial 18 – Simple Snake Game (Part 1). Somebody copied somebody.
anyone can help me the snake isn't move when i press the keys i have tried every way .
🎉thank you
Thank you i will try
oh god i use about 8 for loops to make the snake run =v
wtf. i have just spam "#"
can you send me the source code, please?
Can I see the flow chart?
source code plzz
Thanks
pse se ke bo linkun o burr se na lodhe tu shkrujt krejt ket kod
0:51 i really said, and iostream, you added iostream, i said and conio.h XD, and you added conio.h, i said graphics.h, wait nono i think it would be windows.h, you added windows.h
good video, but the only thing that isnt working for me is the rand()
Can you please give me the source code file
Light background made me skip this video. Change to dark better for your eye and ours <3
hey, i followed everything, have not a single error in my code and my snake just wont eat the fruit, i am a total beginner on coding and wanted to follow along to get a better understanding, i am using windowsvisual studio 2022,