We consolidate our learning from the first 3 SwiftUI projects with the challenge to build another app from scratch.
This time we’re making a twist on the classic game of Rock, Paper, Scissors. Rather than just the straightforward game we know and love, this app will choose one of the options and tell you whether you should try and win or lose! Paul calls it a brain-training app, I call it a brain-breaker.
I quite enjoyed building this, the UI I’ve made is pretty simple (and pretty ugly, to be honest) but the logic was a real puzzler. I started out building some massive switch
statement, and that did work but I didn’t like it. Then I looked at the hints and saw something about using two arrays.
I thought this sounded much more elegant but then I proceeded to take several hours across 3 days banging my head against a wall trying to work out how to implement it.
Thankfully I got there in the end, as you can see from my video of the finished product.