Package game
Class Tile
java.lang.Object
game.Tile
A tile on the game board.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn 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 TypeMethodDescriptionintcoins()Return the value of coins on this Tile.intcolumn()Return the column of this Tile.intReturn the original amount of coins on this tile.introw()Return the row of this Tile.intSet 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
-