Share your repls and programming experiences

← Back to all posts
Terminal Snake Game made with just C++

Terminal Snake Game in C++

Made with C++ and some coffee ☕

Background Information

I just started to learn C++ a few weeks ago. I had background in C which made learning C++ easier and faster. I decided to test out my knowledge and make a fully functional snake game completely in the terminal. I hope you guys like it! Thanks :)

How to Play

Just run this and press "p". The screen may flicker because it was made in the terminal. It generates a new grid after clearing every 400 milliseconds. I tried finding a way to workaround this, but I could not.



Please don't post social media links. I've removed them for you.


Thank you. I wasn't aware of that. This is actually my first post here. @Vandesm14


@NigamDahal That's fine. Welcome to!


hey so i know this library that i use alot of the time(you wont see it on this one cuz this is my sparee) called ncurses. basicly what it does is lets you print stuff wherever you want in the terminal so you dont have to worry about new lines and stuff. all you have to do is put this line of code at the top: #include <ncurses.h> and create another file called .replit and paste this code in it: run = clang++-7 -pthread -std=c++17 -o main -lncurses && ./main and thats it here is a link for and ncurses tutorial:,cursor.%20%205%20X%20window.%20%20More%20 if you have any help let me know hope this helped :)