|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectMonopoly.Cell
Monopoly.Taxes
public class Taxes
This class represents the cells which make a player who lands on them to pay a tax.
Implementation invariants: the tax of the Taxes cell is constant during the game
| Constructor Summary | |
|---|---|
Taxes(java.lang.String name,
int location,
int tax)
Constructs a new Tax cell with specific name location and tax to be paid. |
|
| Method Summary | |
|---|---|
void |
act(Monopoly game)
Forces the player to pay a specific amount of money to the bank. |
int |
getTax()
Returns the amount of money a player must pay if he lands on the Taxes cell (Accessor). |
| Methods inherited from class Monopoly.Cell |
|---|
getLocation, getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Taxes(java.lang.String name,
int location,
int tax)
| Method Detail |
|---|
public int getTax()
public void act(Monopoly game)
act in interface Interactiveact in class Cellgame - the Monopoly instance that represents the game.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||