Class Diagram two
Posted on 2012-09-10
Problem 1: Another card game
There are 52 cards in a deck (Joker is not included). Game starts with shuffling of the cards. Once cards are shuffled, cards are distributed to the players. Game is simple. Each player takes the card which is at top of their collection. Player who has put the high value card takes all the cards and adds it at the bottom of his collection. Game is over when a player loses all the cards. Player who has maximum number of cards is the winner.
Rules of the game:
• Value of the cards in ascending order: 2,3,4,5,6,7,8,9,10,J,Q,K, A
• If player puts same value of different colour then highest is decided in the order (descending). Hearts (highest), Diamonds, Spade and Clubs (lowest). This means 2 Hearts is greater than 2 Clubs.
• 3 of Clubs is greater than 2 of Hearts.
Please suggest me how to Identify the class, property and methods needed to implement solution for this.