monkey doo v2.0 a requirement for cs 12

24
MONKEY DOO V2.0 A REQUIREMENT FOR CS 12 author Ivan Dominic Baguio

Upload: isaiah

Post on 21-Mar-2016

28 views

Category:

Documents


1 download

DESCRIPTION

author Ivan Dominic Baguio. Monkey Doo v2.0 a requirement for CS 12. ABOUT THE GAME. Game Objective. The goal of each player in the game is to discard all cards in his hand before every other player does, and try not to get hold of the “Monkey Card”. Game Play. - PowerPoint PPT Presentation

TRANSCRIPT

MONKEY DOO V2.0A REQUIREMENT FOR CS 12

author Ivan Dominic Baguio

ABOUT THE GAME

Game Objective

The goal of each player in the game is to discard all cards in his hand before every other player does, and try not to get hold of the “Monkey Card”

Game Play

Each turn, a player is to get one card from the next player and discard paired* cards in his hand.

Each turn, the non-AI player is allowed to use his cheats in his Cheat Phase.

*Paired Cards: cards with the same rank, regardless of suit.

Game Phases

Each turn consists of four (4) phases, namely;1. Discard Phase 1

In this phase, a player could discard a paired card from his hand.

2. Cheat Phase In this phase, the non-AI player could use his

cheats to have advantage over AI players3. Main Phase

In this phase, a player must take a card from the next player

4. Discard Phase 2 Refer to Discard Phase 1.

ABOUT THE CLASSES

Classes

Card This class is the “Card” of the game.

Each card object has different properties with other objects.

Cards are implemented as a linear linked list.

Significant Attributes: String rank – the rank of the card (king, ace,

two…) String suit – the suit of the card(hearts,

spades…) String name – the name of the card (<rank>

of <suit>) Card nextCard – reference to the next card

on the list

Classes

Deck This class contains all the information

and methods used to manipulate the deck of the game

Acts as the “holder” of the cards. Significant Attributes:

Card theCard – reference to the head card of the card list

Card monkeyCard – contains the monkey card of the game

Int deckCardCount – counter for the number of cards in the deck (linked list of cards)

Classes

Hand The player’s hand contains all the cards

that he owns. And this class represents the player’s hand.

Similar to the class Deck. Significant Attributes:

Card playerCard – reference to the head of the list of cards that the player has.

Int cardCount – counter for the number of cards in the players hand.

Classes

Player Contains the necessary data of a player

and this class contains an object of the Hand Class.

Significant Attributes: String name – contains the name of the player Hand playerHand – hand of the player that

contains his cards Cheat playerCheat – contains the players

cheats Int (“statistics”) – multiple variables of type int

that holds the players records (win, loss, games played…)

Classes

Cheat This class stores the information about a

player’s cheats. Significant Attributes:

Int (counters) – multiple variables of type int that is the counter for each cheat the player owns.

Manager Classes

These are the abstract classes that do not contain properties or items that are needed to play the game, but contain properties that are needed to run the game.

Called ‘manager classes’ because they are in charge of managing a specific task.

Classes – Manager Class

GameManager This abstract class is the most significant

class of the game, it contains maybe 1/3 of the methods that are needed to run the game.

Manages simple things such as the distribution of cards, setting of players , setting the monkey card, transferring of a card from a player to another, to more complex such as the algorithm for AI’s moves.

Classes – Manager Class

FileManager This abstract class manages the writing

and reading of files. Some significant tasks:

Loading and Saving of player. Getting of the images from specific

locations.

Class – Manager Class

CheatManager This class is tasked to implement the

cheats that the player is using. This class also contains some method that

return the availability of a cheat, or the cost of the cheat, and the string value of the cheat.

How is it different from Cheat Class? The Cheat Class contains only information about the

cheats of a player (number of cheats, etc.) while Cheat Manager is the class the implements the cheats.

Frame Classes

These are the classes extended as a JFrame and contains the Graphical User Interface part of the game.

MainFrame – Frame Class

This frame class contains the GUI of the Main Menu.

Significant Actions: New Player – creates a new player Load Player – loads an existing player Play Game – plays a game Settings – sets the settings View Cheats – shows the player’s cheats View Statistics – shows the player’s

game stats

PlayFrame – Frame Class

This frame contains the GUI for the playing of the game

Significant Actions: Game Phases Discard, Shuffle, Selecting of Cards

Significant Images: Player’s Hand Hand of next player

From v1.0

To v2.0

*GUI is added on v2.0

END of PRESENTATION

Why is the game named “Monkey Doo”?

In local terms, this game is called ‘onggoy-onggoy’ or ‘onggoy-onggoyan’. Translating that to English would be ‘Monkey-Monkey’, but that sounds funny right?

So why Doo? Doo is a random word that entered my

mind when I was thinking of a name for the game, thus the name ‘Monkey Doo’. COOL :P

In Game Cheats

Hand Peep* It allows the player to SEE the hand of the opponent!

Card Peep It selects a random card of from the opponents hand and shows it

to the player. Two Card Peep

Same as Card Peep, but twice the viewing! Mkey Point

Tells the player who currently has the Monkey Card Mkey You

Tells the player if he has the Monkey Card or not Double or Nothing

At the end of the game, if this cheat is activated and the player Wins, he earns double the points.

25% Boost At the end of the game, the player earns 25% more point.

How to get Cheats?

At the end of every game, a player has a chance of receiving cheats, more chances if he has won.

A player may but cheats using his hard earned points at the Main Menu, before a game.