Classic console-based Snake game implemented in C++ with object-oriented design. Features real-time gameplay, collision detection, and terminal-based controls using WASD keys.
Go to file
2025-07-28 20:28:03 -05:00
include Updated arch 2025-07-28 20:28:03 -05:00
.gitignore Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
best_score.txt Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
CMakeLists.txt Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
DarkSnake.png Updated arch 2025-07-28 20:28:03 -05:00
Direction.h Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
Food.cpp Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
Food.h Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
Game.cpp Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
Game.h Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
LICENSE Updated arch 2025-07-28 20:28:03 -05:00
main.cpp Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
Point.h Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
README.md Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
Snake.cpp Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00
Snake.h Initial commit: Console Snake game 2025-07-08 21:50:28 -05:00

🐍 Snake Game

Classic Snake game implemented in C++ with a console interface.

📁 Project Structure

  • main.cpp — Entry point
  • Game.* — Game logic and rendering
  • Snake.* — Snake class implementation
  • Food.* — Food generation system
  • Point.h — Coordinate structure
  • Direction.h — Direction enumeration
  • best_score.txt — High score storage
  • CMakeLists.txt — Build configuration

🛠️ Requirements

  • C++11 or higher
  • CMake 3.10+
  • Linux/Unix terminal

🎮 Features

  • Console-based graphics
  • WASD controls
  • Food generation
  • Collision detection
  • Growing snake mechanics
  • Score tracking
  • Best score persistence

🎯 Controls

  • W — Move up
  • S — Move down
  • A — Move left
  • D — Move right
  • Q — Quit game

📦 Build and Run

mkdir build && cd build
cmake ..
make
./Snake