Snake Game in C++ in 20 minutes (Tutorial)

preview_player
Показать описание
Today I built a simple snake game in C++ programing language around 20 minutes.
Рекомендации по теме
Комментарии
Автор

You also need to check if the food spawned inside the snake and generate new random coords until it isn't.

MotorBorg
Автор

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,

TheTerspet
Автор

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.

FunFindsYT
Автор

anyone can help me the snake isn't move when i press the keys i have tried every way .

fatmaalfahd-rr
Автор

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

lukasjetu
Автор

Can you please give me the source code file

pradipmadlani
Автор

good video, but the only thing that isnt working for me is the rand()

teckdomain
Автор

can you send me the source code, please?

insightifyu
Автор

Light background made me skip this video. Change to dark better for your eye and ours <3

BabyPowder
Автор

oh god i use about 8 for loops to make the snake run =v

lookatmeimthecoolestguy