FlagCapMan is a creative mix of the classic Hangman game and a Capital City Quiz! In each round, a country's flag is displayed, and your mission is to guess its capital by selecting letters, but be careful... with every wrong guess, the glowing red Hangman progresses step by step! ⚡
- 🌍 Live API Integration - Real-time country data from REST Countries API
- 🗺️ Region Selector - Filter countries by continent (Europe, Asia, Africa, Americas, Oceania, or All)
▶️ Dynamic Loading - Click "Start Game" to fetch fresh data- 💾 Score Persistence - Your progress saves automatically using browser storage
⚠️ Smart Error Handling - Clear feedback if connection fails- 🎯 Filtered Countries - Only shows independent nations with valid capitals
- 🏳️ Dynamic country flags from live API
- 🔠 Interactive letter guessing system (A–Z)
- 💀 Six progressive Hangman stages (red neon SVGs)
- 📈 Score tracking that persists across sessions
- 📱 Fully responsive grid layout for all devices
- 🎵 Smooth fade and light glow animations
- 🎨 Sleek red neon cyber-style theme
- Select a Region - Choose your preferred continent or play with all countries
- Click "Start Game" - Loads fresh country data
- Guess the Country - A flag appears with multiple choice options
- Guess the Capital - Select letters to reveal the capital city name
- Watch Your Score - Each win increases your score (saved automatically!)
- Avoid the Hangman - Too many wrong guesses end the round!
- HTML5 - Semantic structure and modern markup
- CSS3 (Grid + Animations) - Responsive design with neon visuals
- JavaScript (ES6+) - Async/await, Fetch API, DOM manipulation
- REST Countries API - Live data source for flags and capitals
- localStorage - Client-side score persistence
| Feature | v1.0 | v2.0 |
|---|---|---|
| Data Source | Static JSON file | Live REST Countries API |
| Region Filtering | ❌ | ✅ 6 regions to choose from |
| Game Start | Auto-loads on page load | User clicks "Start Game" button |
| Score Saving | ❌ Resets on refresh | ✅ Persists with browser storage |
| Error Messages | Basic console logs | User-friendly error display |
| Country Quality | All entries | Filtered (only independent nations) |
Developed by Arash Safari
📧 Email: safari.arash@gmail.com
This project is built for educational and learning purposes. Free to use and modify with proper credit to the developer. 💡
- Country data provided by REST Countries API
⭐ If you enjoyed the project, consider giving it a star on GitHub!