Package Files
Class Card
java.lang.Object
Files.Card
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanAccessor method to get the value of the cannon instance variablebooleangetHorse()Accessor method to get the value of the horse instance variablebooleangetTroop()Accessor method to get the value of the troop instance variabletoString()toString method for the card object
- 
Constructor Details- 
Cardpublic Card(boolean horse, boolean cannon, boolean troop) Constructs a card object- Parameters:
- horse- determines whether or not the car has a horse on it
- cannon- determines whether or not the card has a cannon on it
- troop- determines whether or not the card has a troop on it
 
 
- 
- 
Method Details- 
getHorsepublic boolean getHorse()Accessor method to get the value of the horse instance variable- Returns:
- boolean value of horse instance variable
 
- 
getCannonpublic boolean getCannon()Accessor method to get the value of the cannon instance variable- Returns:
- boolean value of the cannon instance variable
 
- 
getTrooppublic boolean getTroop()Accessor method to get the value of the troop instance variable- Returns:
- boolean value of the cannon instance variable
 
- 
toStringtoString method for the card object
 
-