Skip to content

sougatoroy3/GuessTheFlag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🇺🇳 GuessTheFlag

Welcome to GuessTheFlag — a beautifully designed iOS game built with SwiftUI that tests your knowledge of world flags while keeping things fun, fast, and educational.

🎯 About the Game

GuessTheFlag is a simple yet addictive flag quiz game where users are challenged to pick the correct flag for a randomly selected country from a set of three choices. With every correct guess, you earn a point — but beware, wrong guesses can cost you! The game ends after 8 attempts, and your final score is displayed, giving you the option to restart and beat your high score.


🛠️ Features

  • 🌍 A vibrant collection of flags from 11 different countries
  • 🧠 Randomized flag display and correct answer on each round
  • 📊 Score tracking with real-time updates
  • ⚡ Fast gameplay with immediate feedback
  • 🧃 Elegant and modern UI using SwiftUI with gradients and materials
  • 🔄 Replayable design with a restart option after each game

📸 Preview

Gameplay Correct Answer Alert Wrong Answer Alert Final Score Alert
Gameplay Correct Answer Wrong Answer Final Score

🧑‍💻 Built With

  • SwiftUI: For designing responsive and modern user interfaces
  • Xcode: Project built and run on the latest version of Xcode
  • MVVM Pattern (Lightweight): Logic and UI separation for clarity and scalability

🧪 How It Works

  1. The app randomly selects 3 flags from a shuffled list of 11 countries.
  2. The name of one country is displayed, and the user must tap the correct flag.
  3. Feedback is provided instantly — correct or wrong.
  4. After 8 rounds, a final score alert appears with an option to restart the game.

📁 File Structure

GuessTheFlag/ ├── Assets.xcassets/ # Country flag images ├── ContentView.swift # Main game logic and UI └── GuessTheFlagApp.swift # Entry point of the app


🚀 Getting Started

  1. Clone the repository:
    git clone https://github.com/your-username/GuessTheFlag.git
  2. Open GuessTheFlag.xcodeproj in Xcode.
  3. Run the app on a simulator or your connected iOS device.

💡 Future Enhancements

Add more countries and flags Track high scores locally Add sound effects and animations Add haptic feedback for physical interactions Introduce a difficulty mode or timer

About

An iOS app to calculate score as per the number of right choices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages