Package game
Class Tile
java.lang.Object
game.Tile
A tile on the game board.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
An enum representing the different types of Tiles that
may appear in a sewer system. -
Constructor Summary
ConstructorsConstructorDescriptionTile
(int r, int c, int cv, Tile.TileType t) Constructor: an instance with row r, column c, coin-value cv, and Type t. -
Method Summary
Modifier and TypeMethodDescriptionint
coins()
Return the value of coins on this Tile.int
column()
Return the column of this Tile.int
Return the original amount of coins on this tile.int
row()
Return the row of this Tile.int
Set the value of coins on this Node to 0 and return the amount "taken"toString()
type()
Return the TileType of this Tile.
-
Constructor Details
-
Tile
Constructor: an instance with row r, column c, coin-value cv, and Type t.
-
-
Method Details
-
coins
public int coins()Return the value of coins on this Tile. -
originalCoinValue
public int originalCoinValue()Return the original amount of coins on this tile. -
row
public int row()Return the row of this Tile. -
column
public int column()Return the column of this Tile. -
type
Return the TileType of this Tile. -
takeCoins
public int takeCoins()Set the value of coins on this Node to 0 and return the amount "taken" -
toString
-