|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectMonopoly.Cell
Monopoly.Property
Monopoly.Street
public class Street
This class represents the Street cells on the Monopoly board. The Street cells can be purchaced, a player can build houses and hotels on them, and a visitor pays a rent to the owner of them.
Implementation invariants: the color of the Street cell is constant during the game.
| Constructor Summary | |
|---|---|
Street(java.lang.String name,
int location,
int color,
int price,
int housePrice,
int rent)
Constructs a new Street cell |
|
| Method Summary | |
|---|---|
int |
getColor()
Returns the color of the Street cell (Accessor). |
int |
getRent()
Returns the rent to be paid by a player who lands on this street (Accessor). |
int |
housePrice()
Returns the price of a house which can be build on the street (Accessor). |
int |
numOfHouses()
Returns the number of the Street cell's houses (Accessor). |
| Methods inherited from class Monopoly.Property |
|---|
act, getOwner, getOwnerName, getPrice, ismortaged, mortage, setOwner, toString, unmortage |
| Methods inherited from class Monopoly.Cell |
|---|
getLocation, getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Street(java.lang.String name,
int location,
int color,
int price,
int housePrice,
int rent)
| Method Detail |
|---|
public int getColor()
public int numOfHouses()
public int getRent()
getRent in class Propertypublic int housePrice()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||