Package Files
Class Card
java.lang.Object
Files.Card
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Accessor method to get the value of the cannon instance variableboolean
getHorse()
Accessor method to get the value of the horse instance variableboolean
getTroop()
Accessor method to get the value of the troop instance variabletoString()
toString method for the card object
-
Constructor Details
-
Card
public Card(boolean horse, boolean cannon, boolean troop) Constructs a card object- Parameters:
horse
- determines whether or not the car has a horse on itcannon
- determines whether or not the card has a cannon on ittroop
- determines whether or not the card has a troop on it
-
-
Method Details
-
getHorse
public boolean getHorse()Accessor method to get the value of the horse instance variable- Returns:
- boolean value of horse instance variable
-
getCannon
public boolean getCannon()Accessor method to get the value of the cannon instance variable- Returns:
- boolean value of the cannon instance variable
-
getTroop
public boolean getTroop()Accessor method to get the value of the troop instance variable- Returns:
- boolean value of the cannon instance variable
-
toString
toString method for the card object
-