A fun little game built with Pygame where you control a green square 🟩, collect yellow coins 🟡, and avoid red obstacles 🟥.
Win by collecting 10 coins without crashing into the obstacle!
- 🟩 Move the player using arrow keys.
- 🟡 Collect coins to increase your score.
- 🟥 Avoid the red obstacle — hit it and it's Game Over ❌.
- 🏆 Win when you reach 10 points.
- 🔄 Restart or quit from the end screen.
- ⬆️ Up Arrow → Move Up
- ⬇️ Down Arrow → Move Down
- ⬅️ Left Arrow → Move Left
- ➡️ Right Arrow → Move Right
- 🔄 Press R → Restart game (after win/lose)
- ❌ Press Q → Quit game
Make sure you have Python 3 and Pygame installed:
pip install pygame