GithubHelp home page GithubHelp logo

aarish21 / challenges Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kawasemi081/challenges

0.0 0.0 0.0 626 KB

This is the 100 Days of SwiftUI's milestorn challenge project.

Home Page: https://www.hackingwithswift.com/100/swiftui

License: MIT License

Swift 100.00%

challenges's Introduction

Challenge1: BrainGame

This is the Day25's milestorn challenge project.

game rule:

  • Each turn of the game the app will randomly pick either rock, paper, or scissors.
  • Each turn the app will either prompt the player to win or lose.
  • The player must then tap the correct move to win or lose the game.
  • If they are correct they score a point; otherwise they lose a point.
  • The game ends after 10 questions, at which point their score is shown.

So, if the app chose “Rock” and “Win” the player would need to choose “Paper”, but if the app chose “Rock” and “Lose” the player would need to choose “Scissors”.

Summaries the techniques of projects 1-3

excerpt: Structs vs Classes

There are five key differences between structs and classes:

  1. Classes don’t come with a memberwise initializer; structs get these by default.
  2. Classes can use inheritance to build up functionality; structs cannot.
  3. If you copy a class, both copies point to the same data; copies of structs are always unique.
  4. Classes can have deinitializers; structs cannot.
  5. You can change variable properties inside constant classes; properties inside constant structs are fixed regardless of whether the properties are constants or variables.

If you use structs most of the time, switching to a class in one particular place conveys some intent: this thing is different and needs to be used differently. If you always use classes, that distinction gets lost – after all, it’s extremely unlikely you need them that often.

Challenge2: MultiplicationTables

Your goal is to build an “edutainment” app for kids to help them practice multiplication tables – “what is 7 x 8?” and so on. Edutainment apps are educational at their code, but ideally have enough playfulness about them to make kids want to play.

game rule:

  • The player needs to select which multiplication tables they want to practice. This could be pressing buttons, or it could be an “Up to…” stepper, going from 1 to 12.
  • The player should be able to select how many questions they want to be asked: 5, 10, 20, or “All”.
  • You should randomly generate as many questions as they asked for, within the difficulty range they asked for. For the “all” case you should generate all possible combinations.

Summaries the techniques of projects 4-6

Challenge3:

game rule:

Summaries the techniques of projects 7-9

excerpts:

challenges's People

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.