I want to have a Java game like the crazy 8 ([login to view URL]).
Rules:
1-The game has to assume there is a main player (from the point of view from who's playing).
And this player is always the first to play in the begging of the game.
2-The distribution of the cards it's always made by order, starting from the main player and continuing to the other players next to him.
3-The Ace card doesn't have any special meaning.
4-You can only play one card two at each time. When those cards are played, the next player must grab the two cards from the main pile of cards, not being able to play. The game continues normally with the player next to the player that has grabbed the two cards.
The state and the flux of the game must be represented by an object, which must be created pointing the number of participants, with the minimum of two players and the maximum of eight.
After initializing the game, it should be possible at any moment of the game:
1-To know the cards that's on top of the pile where you put the cards already played.
2-Obtain the next player to play.
3-Knowing which suit that can be played, when an eight has been played, you can choose a different suit of cards on the top of the pile of the cards that have been played.
4-Knowing how many cards must the current player grab, because it has been played a two or a queen of spades. Must return zero in all other cases.
5-Knowing if the pile of cards you can grab is empty.
Even more it must be possible to :
1- Put in the pile of cards that have been played a card that can be chosen by the main player (If it's the main player's turn to play).
2-Recover from the pile of cards resultant from the previous turn, when it has been played a two or a queen of spades (case it's the main player turn).
3- Take a card from the main pile (if it's the main player turn).
4-Choose a suite, case you have finished playing an eight card.
5-Transfer all the card, except the card from the top of the pile of the card's that have been played to the pile of cards that haven't been played yet (the main pile).This operation can only occur if the main pile is empty, and the cards must be shuffled before being placed.
6-Make the next player play automatically (in case it's not the main player's turn).
The turn's automatically must follow the same rules announced for the main player, according a tactic to be defined by yourself, and must be explained in detail, through comments on the code, as well as a little report of (max A4 page), that must be delivered with the code.
I would also want you to add comments on the code like you were explaining to a begginer (like myself) how to do it in order for me to understand what you did and how to do it.
Hi, I'm a Sun Certified Java Programmer (SCJP6), and I can create this application for you quickly, professionally, and it will be well-documented. You can contact me to discuss it further...