com.TeamHEC.LocomotionCommotion.Card
Class Game_CardHand.Game_CardHandManager

java.lang.Object
  extended by com.TeamHEC.LocomotionCommotion.Card.Game_CardHand.Game_CardHandManager
Enclosing class:
Game_CardHand

public static class Game_CardHand.Game_CardHandManager
extends java.lang.Object


Field Summary
static CardActor card1
           
static CardActor card2
           
static CardActor card3
           
static CardActor card4
           
static CardActor card5
           
static CardActor card6
           
static CardActor card7
           
 com.badlogic.gdx.utils.Array<CardActor> cardactors
           
 int cardActors
           
 java.util.ArrayList<CardActor> currentHand
           
 int height
           
static java.util.ArrayList<Card> newcards
           
 int numberofcards
           
 boolean open
           
 int selectedCard
           
 int stagestart
           
 SpriteButton usecardbtn
           
 
Constructor Summary
Game_CardHand.Game_CardHandManager()
           
 
Method Summary
 void addCard(Card newCard)
          Adds given card to hand if hand is not full.
 void changeHeight(float height)
          Moves the cards up or down
static void changePlayer(Player player)
          Change Player gets the cards from the new player when a turn is ended and puts the player's cards back.
static void collapseCards()
          CollapseCards- resets any card that is not selected to unexpanded position
 void create(com.badlogic.gdx.scenes.scene2d.Stage stage)
           
static void flushHand()
          FlushHand clears all the card Actors and sets the numberofcards to 0.
static CardActor getSelectedCard()
          Getter for selectedcard
 void organiseHand()
          organiseHand collapses all cards or all the cards except for the selectedCard.
 void useCard(int cardNum)
          useCard is called from the usecard button and implements the card's action and removes it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cardactors

public com.badlogic.gdx.utils.Array<CardActor> cardactors

currentHand

public java.util.ArrayList<CardActor> currentHand

newcards

public static java.util.ArrayList<Card> newcards

open

public boolean open

card1

public static CardActor card1

card2

public static CardActor card2

card3

public static CardActor card3

card4

public static CardActor card4

card5

public static CardActor card5

card6

public static CardActor card6

card7

public static CardActor card7

stagestart

public int stagestart

cardActors

public int cardActors

height

public int height

selectedCard

public int selectedCard

numberofcards

public int numberofcards

usecardbtn

public SpriteButton usecardbtn
Constructor Detail

Game_CardHand.Game_CardHandManager

public Game_CardHand.Game_CardHandManager()
Method Detail

create

public void create(com.badlogic.gdx.scenes.scene2d.Stage stage)

changePlayer

public static void changePlayer(Player player)
Change Player gets the cards from the new player when a turn is ended and puts the player's cards back. This involves flushing the other players hand of CardActors.

Parameters:
player - - Current Player.

flushHand

public static void flushHand()
FlushHand clears all the card Actors and sets the numberofcards to 0.


useCard

public void useCard(int cardNum)
useCard is called from the usecard button and implements the card's action and removes it.

Parameters:
cardNum -

addCard

public void addCard(Card newCard)
Adds given card to hand if hand is not full.

Parameters:
newCard - - new card passed to be put in the hand.

changeHeight

public void changeHeight(float height)
Moves the cards up or down

Parameters:
height - - the pixel to which you want to increase/decrease the height of the cards

organiseHand

public void organiseHand()
organiseHand collapses all cards or all the cards except for the selectedCard.


collapseCards

public static void collapseCards()
CollapseCards- resets any card that is not selected to unexpanded position


getSelectedCard

public static CardActor getSelectedCard()
Getter for selectedcard

Returns:
either selected card actor or null (if non are selected)