-
Notifications
You must be signed in to change notification settings - Fork 11
Description
So, what is it about?
Create a console-based Snake Game in C++ that demonstrates Object-Oriented Programming (OOP) principles such as encapsulation, abstraction, and modularity.
The game should allow the player to control the snake using keyboard inputs, eat food to grow, and end the game upon collision with walls or itself.
Expected Features:
Snake moves within a bounded area (console grid).
Player controls snake using W, A, S, D keys.
Snake eats food (F) to grow and increase score.
Game ends if snake collides with wall or itself.
Display current score in real time.
Clean OOP design using at least 3 classes:
Snake – handles body, movement, and growth.
Food – spawns food at random positions.
Game – manages input, logic, and display.
Concepts to Apply:
Encapsulation (private members, public methods)
Modular class design
Basic game loop (draw(), input(), logic())
Random food generation
Code of Conduct
- I agree to follow this project's Code of Conduct