You already know what this game is. It's snake.
It's a couple hundred lines of code I wrote to test my new development environment. Nothing fancy, just a snaky boi eating some apples.
Have fun.
g++ snake.cpp -lSDL2 -o snake ; ./snake
You need libsdl2-dev installed of course (via apt or otherwise)