mardi 20 octobre 2015

How to shuffle Buttons in Swift?

I'm relatively new to Swift and programming. So some broad explanation would be greatly appreciated. Goal: clicking on one buttons results in end game, clicking on another proceeds to the next level.

Questions: 1. How to shuffle buttons every time I click on them(+to shuffle the buttons before the game starts so I don't know the first button)? The point is that the buttons are the same so the users never knows what button to click (just so you can understand the process; it's not the whole app).

  1. How to make numbers change to the next pair (from 1 and 2 to 3 and 4 and so on) when you click on the right button?

I don't need the whole app code, just those parts would be enough. Thank you!!!

enter image description here




Aucun commentaire:

Enregistrer un commentaire