100 Days of SwiftUI
2026-05-13
Milestone: Projects 1-3
the
Viewprotocol is the centerpiece of SwiftUI – anything can conform to it and start taking part in layouts, in just a few simple lines of code
And he all of a sudden introduced custom bindings?
Challenge
Make a game that challenges players to win or lose at rock, paper, scissors.
So, very roughly:
- Each turn of the game the app will randomly pick either rock, paper, or scissors.
- Each turn the app will alternate between prompting 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”.
I once made an iterated rps game where scissors won most of the time. Moral: don’t trust random number generators you find on the internet.
My Solution
I added the “Tie” condition and made the conditions random. It was a struggle — it’s pretty awesome that Bill and I are doing this together!
