In this exam, you will create a card game where a user plays against the computer.
PlayingCard
:
PlayingCard
class to have a computed score attribute. A card's score is a
combination of it's Suit
and Rank
. For this J, Q, K and A can be considered
11, 12, 13 and 14 respectively. and ♠, ♥,
♦, and ♣ can be 4, 3, 2 and 1 respectively. You need to combine
the two to obtain a score. As an example, please note that 10 ♦ should
have a higher score than 10 ♣.
PlayingCardView
and should display with images and pips, just
like we did in class.
CardGame
class that contains the logic of your game (See below). The combination of
PlayingCard
, PlayingCardDeck
, and CardGame
classes will be your model.
The game will work as follows:
Deal
button, the correct number of cards are presented
to the user. The cards should be dealt face down with animation and then flipped over with
animation.
Swipe Right
gesture on the card to be traded in. The card being traded in, should
be animated off the screen and the replacement card should be dealt out face down with animation
and then flipped over with animation.
Bet
button.
Deal
button and now the computer will deal itself an equal number of cards with the
same animations.
Deal
button must be disabled.
Bet
button should be disabled when betting is not taking place.
(i.e. User should not be able to increase their bet after seeing the computer's cards).
TabViewController
to have 2 versions of the game:
Deal
button for dealing a cards. Please note that this button is
used for dealing out the user's cards and the computer's cards.
Bet
button that increases the bet by $1 every time it is pressed.
Reset
button to start a new game.
Please submit the completed final exam on Blackboard as a zip file of your entire project. No other forms of submission will be accepted.