Package dev.davwheat
Class BoardSpace
- java.lang.Object
-
- dev.davwheat.BoardSpace
-
- Direct Known Subclasses:
Animal
public class BoardSpace extends java.lang.ObjectA space on the GameBoard which a Player can land on and interact with.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringdisplayNameThe name displayed to Players for this Board Space.intindexThe position of this BoardSpace on the GameBoard.booleanisOwnableWhether this BoardSpace can be owned by a Player.BoardSpaceTypetypeThe type of BoardSpace.
-
Constructor Summary
Constructors Constructor Description BoardSpace(java.lang.String displayName, int index, BoardSpaceType type, boolean isOwnable, Game game)Create a new instance of BoardSpace.
-
-
-
Field Detail
-
index
public final int index
The position of this BoardSpace on the GameBoard.
-
type
public final BoardSpaceType type
The type of BoardSpace.
-
displayName
public final java.lang.String displayName
The name displayed to Players for this Board Space.
-
isOwnable
public final boolean isOwnable
Whether this BoardSpace can be owned by a Player.
-
-
Constructor Detail
-
BoardSpace
public BoardSpace(java.lang.String displayName, int index, BoardSpaceType type, boolean isOwnable, Game game)Create a new instance of BoardSpace.- Parameters:
displayName- The name of the BoardSpace shown to the players.index- The position of this BoardSpace on the GameBoard.type- The type of this BoardSpace.isOwnable- Whether this BoardSpace can be owned by a Player.game- The Game that this BoardSpace belongs to.
-
-