0% found this document useful (0 votes)
12 views7 pages

Planning Document

The document outlines a plan to program a Uno game allowing 3-6 players. Key aspects include: - Storing card objects in an arraylist, with functional cards inheriting from a base Card class. - A GameRunner class containing game logic and storing players and direction. - A Player class storing a player's name, hand, and wins. - A CardManager class organizing card piles and drawing cards. - Functional cards like Skip and Reverse inheriting methods from Card to modify the game. Development will follow specified naming conventions and use Google Docs for collaboration. Classes, methods, and a timeline are outlined.

Uploaded by

garygaoyx1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views7 pages

Planning Document

The document outlines a plan to program a Uno game allowing 3-6 players. Key aspects include: - Storing card objects in an arraylist, with functional cards inheriting from a base Card class. - A GameRunner class containing game logic and storing players and direction. - A Player class storing a player's name, hand, and wins. - A CardManager class organizing card piles and drawing cards. - Functional cards like Skip and Reverse inheriting methods from Card to modify the game. Development will follow specified naming conventions and use Google Docs for collaboration. Classes, methods, and a timeline are outlined.

Uploaded by

garygaoyx1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Project Management Plan

Gary Gao, Tahseem Kahn, Felix Zhang


ICS4R - Gilfillan
Ideas:
- Pizza restaurant (2D array with topping locations on pizza, inheritance with food and type of food, Pizza
can be printed to a file, Receipt can be arraylist to add items)
- Monopoly (array lists for property easy to add and transfer, data can be saved to files and read from files,
so you can continue games)

Uno (arraylist to store cards, simple cards store their color and value, advanced cards inherit those values and their
special operator.

Introduction to the program


We will program a Uno game which will allow 3 - 6 people to start each game by getting 7 of the 108
cards each. Players will be able to choose which cards they want to use each round, this includes normal cards and
function cards. Each move will show a screen showing movie details, the other players, direction, and number of
cards (1,2, or 3 and more). Choosing a card will be done by entering the number the card is labeled. Normal cards
include colors and numbers, and function cards include reversals, color changes, skip, +4 and +2.
Each turn the player can use the appropriate card, the program will detect the color and function of the last
card and react accordingly. For storing cards, we plan to create card objects and inherit all functional cards, so that
all cards can be stored/initialized/pulled at once by simply storing all card objects in an arraylist.

Naming conventions and formatting


1. Variables and methods will be named using lower camel cases. All lower case on the first word, and
capitalize the first letter of every subsequent word. (ex. methodAdder, strName).
2. Objects will be named using upper camel case. (ex. ObjectOne).
3. Variables will begin with a 3 letter prefix to depict the variable type.
Byte byt

Short shr

Integer int

Long lng

Float flt

Double dbl

Char chr

Boolean bol

Constants/final No variable prefix, all caps, Underscore


between words
4. Commenting
a. Description, author and start date for all classes and methods
5. Code structure:
a. brace brackets ({, }) will always be on their own line with nothing else.
b. Spaces on both sides of operators and symbols, except for semicolons and ++, -- operators. (i = 0;
i < b; i++);
Mode of cooperation: Google spaces on gmail.
Programming Software: Replit

Gantt Chart/TimeLine/divide up the work: Gantt Chart template.xlsx


Objects and Methods

Test class object Variables:


- ArrayList of Game runner objects to store each game round,
The test class will be used to players can start new games.
simply start the game, all logic
code will be done in the Game
runner class. This is done because
the player can start the next game
without restarting the game.

Game runner object Variables:


- ArrayList of player objects to store each player (max 4)
The game runner class will contain - Boolean to store direction of movement (left and right)
all the logic code, which includes - Byte variable to act as a buffer storage for +2 and +4 cards. This
the system dealing the cards, the variable will store the number of cards to add to the current mover
player drawing, selecting, and until a player chooses not to play another +2 or +4 or they do not
using the cards. It is possible that have one of those two cards.
some of the logic for the function - Byte to store 0-4 to store the 5 colors.
cards will be here as well
Methods:
- Next move: returns a byte using a variable and boolean(direction).

Public byte nextMove(boolean bolDirection);

- Give cards, this method will give a card to a player. Takes in a


byte 0-4.

Public void giveCard(Player player, cardManager manager);

- Add card, this method will take in 4 player objects and loop
through the give card method to give the victim player the cards.

Public void addCard(byte cardNum, Player player, cardManager


manager);

Player object Variables:

Playerclass is used to store a - An Arraylist of bytes that holds the current number of cards the
player's name, hand, skill effects, player has
win/loss information, etc. - String to store player name
- Byte to store number of wins

Card Manager object Variables:


- Two Arraylist of cards which get distributed to players. The two
Card Manager is used to organize will swap to deal with when the draw card pile becomes empty.
piles of cards and to organize piles
of used cards, and it can also Methods:
randomly draw cards and deal - Scramble cards
them to players.
Public void dealCards(ArrayList players );

- Reshuffle played cards from pile 2 into pile 1.

Public void reshuffleCard();

- Given a card, this will take the top card from pile 1 and return it, it
will then delete that card from its array, essentially moving it to a
player.

Public void getCard(Player player);


Or Public Card getCard();

Card object Variables:


- Byte value 0 - 9, 10, 11, 12, 13, and 14 when the card colour is
The card class is used to store all black will be used to indicate a special card. (numbers above 9
types of cards, it will store the represent special cards)
number and color information of - Byte variable 0 - 4 to store color (red, yellow, green, blue and
all cards and inherit all function black)
cards - String variable to store the type of card for output info (regular,
change colour, 2, 4, skip, reverse)

Inheritance (these things will inherit from this object):


- Skip card
- Reverse
- +2 card
- Change colour
- +4/change colour

Reverse Card extends card Methods:


Reverse order of turn: Changes the direction variable within the game
runner, calls on a setter variable

Signature Public boolean reverseCard();

Variable NA

Return bolReverseNewOrder;

Parameters bolReverseOldOrder;

Skip Card extends card Methods:


Skips next person’s turn, adds or subtracts 1 from the turn counter variable,
calls on a setter variable

Signature Public void skipCard();


Variable NA

Return NA

Parameters NA

+2 Card extends card Methods: Adding a person's hand will call the player object and card
Manager

Signature Public void add2Card(Player player,


cardManager manager);

Variable NA

Return NA

Parameters - Player object is used to get


information about the player's
hand
- Card Manager object is used to
draw new cards from the pile

Change color card extends card Methods: Change color class will subtract a card from the deck in the card
manager object and let the user specify the color of the next card in the
Game runner

Signature Public void changeColour(Player p,


cardManager m, gameRunner game);

Variable The String variable is used to receive the


color selected by the user

Return NA

Parameters - Player object is used to receive


information about the cards in
the user's hand
- cardManager object is used to
update the information of used
cards.
- gameRunner object is used to
update the colors of the cards
for the next turn.

+4/Change Colour Card extends Methods:


card changeColorAdd4 class will subtract a card from the deck of the Card
Manager object and let the user specify the color of the next card in the
game runner. The next user will take 4 cards from the deck manager and
update the deck manager
Signature Public void changeColorAdd4(Player
player, Player nextPlayer, cardManager
m, gameRunner game)

Variable - The String variable is used to


receive the color selected by the
user

Return NA

Parameters - The Player object is used to


receive information about the
cards in the user's hand.
- Player nextPlayer is used to
receive information about the
cards in the user's hand and add
4 cards to the player's hand
arraylist.
- cardManager object is used to
update the information of used
cards and receive new cards.
- The gameRunner object is used
to update the color of the cards
for the next round.

You might also like