| Modifier and Type | Field and Description |
|---|---|
private Player[] |
Game.players |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<Player,javax.swing.JPanel> |
GUI.playerPanels |
private java.util.Map<Player,javax.swing.ImageIcon> |
GUI.playerPawns |
| Modifier and Type | Method and Description |
|---|---|
private Player |
Game.determineWinner()
Determines the winner of the game.
|
Player |
Game.getCurrentPlayer()
Get the current player.
|
Player |
Property.getOwner()
Get the owner of the Property.
|
Player[] |
Game.getPlayers()
Get an array of all players.
|
| Modifier and Type | Method and Description |
|---|---|
Property |
GUI.askForProperty(Player player,
java.util.ArrayList<Property> list)
Displays a drop-down menu of properties for which the player may purchase
houses.
|
(package private) abstract Property |
MonopolyUI.askForProperty(Player player,
java.util.ArrayList<Property> list)
Displays a drop-down menu of properties for which the player may purchase
houses.
|
Property |
Console.askForProperty(Player player,
java.util.ArrayList<Property> list)
Displays a drop-down menu of properties for which the player may purchase
houses.
|
boolean |
GUI.askQuestion(Player player,
java.lang.String str)
Displays a question prompt for a particular user with "yes" and "no"
options.
|
(package private) abstract boolean |
MonopolyUI.askQuestion(Player player,
java.lang.String str)
Displays a question prompt for a particular user with "yes" and "no"
options.
|
boolean |
Console.askQuestion(Player player,
java.lang.String str)
Displays a question prompt for a particular user with "yes" and "no"
options.
|
private void |
Game.buyHouseForProperty(Player player,
Property property)
Player purchases a house for the specified property
|
private void |
Game.buyHouses(Player player)
Builds a list of properties for which a player may purchase houses
and prompts them to purchase on or more houses
|
void |
GUI.displayMessage(Player player,
java.lang.String str)
Displays a message that does not require a response for a particular user
|
(package private) abstract void |
MonopolyUI.displayMessage(Player player,
java.lang.String str)
Displays a message that does not require a response for a particular user
|
void |
Console.displayMessage(Player player,
java.lang.String str)
Displays a message that does not require a response for a particular user
|
private void |
Game.landedOnChance(Player player)
Handles game play when a player lands on a chance space.
|
private void |
Game.landedOnGoToJail(Player player)
Handles game play when a player lands on "go to jail."
|
private void |
Game.landedOnProperty(Player player,
Property property)
Handles game play when a player lands on a particular property.
|
private void |
Game.movePlayer(Player player,
int distance)
Moves a player a specific number of spaces around the board.
|
private void |
Game.moveToSpace(Player player,
int location) |
boolean |
Board.playerOwnsGroup(Player player,
int group)
Checks if a player owns all the properties in the group
|
void |
Property.setOwner(Player owner)
Set the owner of the Property.
|
private void |
Game.takeTurn(Player player)
Handles a whole turn for a player.
|
| Constructor and Description |
|---|
Game(Player[] players)
Construct a new Game with an array of players.
|
Game(Player[] players,
java.lang.String filename)
Construct a new Game with an array of players and a file that
contains board information.
|