viczhong / AC-iOS-ThreeCardMonteExercise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AC-iOS-ThreeCardMonteExercise

Welcome Developers! Here is your in-class exercise for today:

Overview

The name of the game is Three Card Monte

Creat three "cards" made from UIButtons.

When the user selects the winning card, the King, tell the user they have won.

When the user selects the incorrect card, reveal the card they picked and the King. Tell the user they lost.

Your app should include a new game button that returns the cards to the face-down position.

Your final app should look like the gif below.

Stage 1:

Create three buttons. If the user selects the first button on the right then tell the user they won. If the user selects any other button, then display to the user they lose.

After a user clicks on a button, disable all buttons until the new game button is pressed. Reset the text to an introductory message.

Stage 2:

Make the winning button be randomly selected. Each game should have a randomly generated winning card.

Stage 3:

Add images to the button to make them look like cards. You Build the app to look like the example.

Final product

Bonus 1:

Add a label that saves the users score.

Bonus 2:

Add a fourth card

Bonus 3:

Add a fifth card

Bonus 4:

Have 3 different new game buttons:

  • New 3-card Game
  • New 4 card Game
  • New 5-card Game

That each begin a game of the appropriate type, hiding unused cards as necessary.

About

License:MIT License


Languages

Language:Swift 100.0%