Three Card Monte Lab

Instructions for lab submission

  1. Fork the assignment repo
  2. Clone your Fork to your machine
  3. Complete the lab
  4. Push your changes to your Fork
  5. Submit a Pull Request back to the assignment repo
  6. Paste a link to of your Fork on Canvas and submit

Overview

The name of the game is Three Card Monte

Create 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. 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.