Monday, June 4, 2018

WEEK 3

Task:
In this week I made a memory game in which the grid was 4*4 with 16 different buttons and we have to click on the random button and if the image matches with the previous image user will score a point or there will be no point achieved.

Implementation:

add 16 Buttons on the screen and add 4 images to each button.




































I added my own pictures of hulk, ironman, spiderman and superman.


when the image matches with the same previous image score is added.



Then i set the constraints for a better gaming layout and alignment

then we added reset button 




Runtime images:




Reflection:


  • how to add more than one button to same action
  • learnt how to add outlets
  • learnt how to add action methods and OutletCollection
  • how to set random values in a array with the help of aec4random_(UInt32())
  • how to use constraints to use the app on any phone.

No comments:

Post a Comment