Coder Social home page Coder Social logo

crowdedastronaut / guesstheflag Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1018 KB

Guess The Flag is a native iPhone guessing game that helps users learn some of the many flags of the world. It is built entirely in SwiftUI.

Swift 100.00%
swift ios swiftui-learning swiftui-example

guesstheflag's Introduction

GuessTheFlag - 100 days of SwiftUI solution

This is a solution to the Guess the flag challenge on 100 days of SwiftUI.

Table of contents

About

Guess The Flag is a native iPhone guessing game that helps users learn some of the many flags of the world. It is built entirely in SwiftUI.

· Using stacks to arrange views · Colors and frames · Gradients · Buttons and images · Showing alert messages · Stacking up buttons · Showing the player's score with an alert · Styling the flags · Tracking the users score · Ending the game · Removing repeats

The challenge

Users should be able to:

  • Select from a group of 3 different country flags
  • Get alerted and increase their score if they answer correctly
  • Get alerted and decrease their score if they answer incorrectly
  • Never be allowed to score below zero
  • Only be allowed to play 10 rounds
  • Be able to restart the game
  • Experience an aesthetically pleasing and intuitive UI

Screenshots

Mobile Preview

Mobile Preview

Technologies

Native Languages & Utilities Swift Git


What I learned

This was my second project in SwiftUI, and it tested basic SwiftUI functionality: stacks, buttons, images, alerts, asset catalogs, and more. This exercise also illustrated the efficiency of SwiftUI: the entire application (including the styling) is 94 lines of code!

Author

Acknowledgments

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.