com.TeamHEC.LocomotionCommotion.Card
Class Card

java.lang.Object
  extended by com.TeamHEC.LocomotionCommotion.Card.Card
Direct Known Subclasses:
GoFasterStripesCard, GoldCard, ResourceCard, TeleportCard

public abstract class Card
extends java.lang.Object

Author:
Matthew Taylor , Callum Hewitt

Constructor Summary
Card(Player player, com.badlogic.gdx.graphics.Texture image, java.lang.String name)
          Initialise's the Card's key parameters.
 
Method Summary
 com.badlogic.gdx.graphics.Texture getImage()
          Gets the texture of the card
 java.lang.String getName()
          Gets the name of the card
 Player getOwner()
          Returns the player that owns that card
 void implementCard()
          A method to be overridden in subclasses.
 void setOwner(Player owner)
          Sets the owner of the card
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Card

public Card(Player player,
            com.badlogic.gdx.graphics.Texture image,
            java.lang.String name)
Initialise's the Card's key parameters. Card is abstract so should only be called as super();

Parameters:
player - The owner of the card.
image - The texture used in displaying the card in the dock
name - The name of the card. Eg. \"Coal\" or \"Teleport\"
Method Detail

getOwner

public Player getOwner()
Returns the player that owns that card

Returns:
the player of the card

setOwner

public void setOwner(Player owner)
Sets the owner of the card

Parameters:
owner - this is the owner of the card

getImage

public com.badlogic.gdx.graphics.Texture getImage()
Gets the texture of the card

Returns:
Texture - cardImage

getName

public java.lang.String getName()
Gets the name of the card

Returns:
string - name

implementCard

public void implementCard()
A method to be overridden in subclasses. This determines what happens when the card is used.