We will create a Random Number Generator.
- Clone down the repository locally to your machine
- Create a new branch
- Using the
TestView
SwiftUI View add the following:- Single Output For Displaying Text
- Single Text Field
- Single Button
- Behavior:
- Pressing the button generates a single random number (0-3)
- Code for Random Number:
Int.random(in: 0 ..< 4)
- Code for Random Number:
- The numbers are displayed in the UI’s Output by default
- If the number inputted in the Text Field matches the random number generated, show the word “MATCH!” in the UI
- Pressing the button generates a single random number (0-3)
- When complete, commit and push (the push command will fail, its okay, ignore)