Skip to content

ArashSafarighouzhdi/FlagCapMan2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 FlagCapMan v2.0

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 Demo

👉 Play the Game Here


🚀 Features

🔥 New in v2.0:

  • 🌍 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

✨ Core Features:

  • 🏳️ 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

🧠 How to Play

  1. Select a Region - Choose your preferred continent or play with all countries
  2. Click "Start Game" - Loads fresh country data
  3. Guess the Country - A flag appears with multiple choice options
  4. Guess the Capital - Select letters to reveal the capital city name
  5. Watch Your Score - Each win increases your score (saved automatically!)
  6. Avoid the Hangman - Too many wrong guesses end the round!

🧩 Technologies Used

  • 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

🆚 What's Changed from v1.0

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)

👨‍💻 Developer

Developed by Arash Safari

📧 Email: safari.arash@gmail.com


🏁 License

This project is built for educational and learning purposes. Free to use and modify with proper credit to the developer. 💡


🙏 Credits


If you enjoyed the project, consider giving it a star on GitHub!

About

FlagCapMan v2.0 is a data-driven evolution of the classic Hangman game combined with a Capital City quiz. It uses live data from the REST Countries API, supports continent-based filtering, saves progress automatically, and includes smart error handling for a smooth experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors