Skip to content
Rohit2387Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🐍 AddictSnake

The most addictive terminal Snake game you've ever played.

A modern, colorful, and highly replayable implementation of the classic Snake game written in clean C++ with ncurses. Features smooth controls, progressive difficulty, persistent high scores, and that perfect "just one more try" feeling.

C++ ncurses License Platform


✨ Features

  • Beautiful terminal UI — Colored snake (cyan head + green body), red food, elegant borders
  • Progressive difficulty — Speed increases every 5 fruits eaten (real level progression)
  • Persistent high scores — Saved automatically in ~/.addictsnake_highscore
  • Smooth controls — Supports both WASD and Arrow keys
  • Quality of life — Pause (P), instant restart on Game Over (R), clean quit
  • Bonus scoring — Extra points at milestones for that dopamine hit
  • Single-file codebase — Easy to read, modify, and learn from
  • Cross-platform — Works great on macOS and Linux

🎮 How to Play

Controls

Key Action
W / ↑ Move Up
S / ↓ Move Down
A / ← Move Left
D / → Move Right
P Pause / Resume
Q or ESC Quit
R Restart (on Game Over)

Tip: You cannot reverse direction instantly — this prevents accidental deaths.


🚀 Quick Start (macOS & Linux)

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/addictsnake.git
cd addictsnake

2. Build

make

Or manually:

g++ -std=c++11 -o addictsnake addictsnake.cpp -lncurses

On Apple Silicon (M1/M2/M3/M4) Macs (if make complains):

make
# or
g++ -std=c++11 -I/opt/homebrew/include -L/opt/homebrew/lib -o addictsnake addictsnake.cpp -lncurses

3. Play!

./addictsnake

That's it. Enjoy the addiction.


📦 Makefile Commands

Command Description
make Build the game
make run Build + launch immediately
make clean Remove the binary
make install Install to /usr/local/bin (sudo)

🛠 Requirements

  • C++11 compatible compiler (g++ or clang++)
  • ncurses library
    • macOS: brew install ncurses
    • Ubuntu/Debian: sudo apt install libncurses5-dev
    • Fedora: sudo dnf install ncurses-devel

🧠 Why It's So Addictive

  • The speed curve is perfectly tuned — it starts chill and becomes intense
  • High score persistence creates a personal leaderboard
  • The "Level" indicator gives clear progression feedback
  • Clean visual feedback (bold head, pulsing food, nice borders)
  • Instant restart keeps the flow state going

📸 Screenshots

(Add your own screenshots here after playing — the game looks great in most terminals)

Gameplay

╔══════════════════════════════════════════╗
║                                          ║
║          Ooo                             ║
║            o                             ║
║             o                            ║
║              *                           ║
║                                          ║
╚══════════════════════════════════════════╝
SCORE:   120     HIGH:   340     Level: 4

🤝 Contributing

This is a single-file game meant to be simple and fun. Feel free to fork and add:

  • Power-ups (golden apple, slow time, etc.)
  • Multiple levels / obstacles
  • Sound effects (with beep or external lib)
  • Online leaderboard
  • Windows support (PDCurses)

Pull requests welcome!


📄 License

MIT License — feel free to use, modify, and share.


💡 Credits

Built with ❤️ and lots of terminal sessions by Grok + you.

Pro tip: Try to beat 500 points. It gets really hard after that.

Enjoy the loop. 🐍🔥

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages