https://github.com/si-ja/snake-cpp
Snake game in console written in C++
https://github.com/si-ja/snake-cpp
Last synced: 3 months ago
JSON representation
Snake game in console written in C++
- Host: GitHub
- URL: https://github.com/si-ja/snake-cpp
- Owner: Si-ja
- Created: 2020-07-18T22:54:34.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T23:14:34.000Z (almost 5 years ago)
- Last Synced: 2025-01-26T06:41:12.182Z (5 months ago)
- Language: C++
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Snake Game in Console (C++)
----I started trying to get familiarized with C++. By the time this project has been made I haven't gone in too far (not even covered classes or pointers). However, I did want to apply some of my knowledge of what I learned to making of a small project (mostly in order to work on my skills). One of the ideas were to make a simple game in a console using ASCII style art for graphics.
In short: the game has been made. It's a fully playable game with it's own Menu screen where you can chose how fast you want the game to be (using left and right arrow keys):

The game play is...well it exists and the game could be played almost properly:

And there is an end Screen informing the player of what their score is for the game they played:

## Current issues that might need addressing:
1. For some reason the "Fruit" sometimes just does not appear in the game environment. For that so far an ability to press the 'z' button has been added, so it would be respawned into a new location.
2. The second piece of the tail that the snake spawns always appears on the right side of the Head of the snake and just stays there. It in terms messes up the graphics of the right wall. No issues with other pieces of the tail have ever been noticed.## Features to add (TODO):
1. So far there is no way to get a game over by hitting your own tail, but only the walls. Collision with self parts is still in need of being added.
2. The game over screen does not lead anywhere. With the current build it was not possible to easily restart the game for the player. Maybe in the future the code can be refactored for this.## Final Verdict:
This was a quite enjoable and interesting project to work on. The issues that have been noticed are a good ground for the future to improve upon. As the first game project writtein in the console - I'm quite happy with it.