Posts

Showing posts with the label data model

Angela Yu Course Part 7 (up to lesson 90)

Image
Before I go into the next part of Angela's course, I've been experimenting with the 'Yahtzee' app! It's actually gone much better than expected - I've managed to put together this: The dice roll when they are clicked, you click on the number buttons (1, 2 etc.) to assign that score...it took a lot of logic! One of the things I'm most proud of is the diceFunction, which combines several functions and bits of code together! unc diceFunction(diceNumber: Int ) {                  func isDiceEqual( _ : Int ) -> Int {                          var count = 0                          let diceIndexArray = [ randomDiceIndex1 , randomDiceIndex2 , randomDiceIndex3 , randomDiceIndex4 ]                          for x in diceIndexArray...