package core;

import java.util.Random;
import java.util.Vector;


public class Player {
	private Vector<Card> cards;
	private Field field;
	private int number;

	public Player(int number) {
		this.cards  = new Vector<Card>();
		this.field  = new Field();
		this.number = number;
	}

	public void drawCard(int cardNumber) {
		for (int i = 0; i < cardNumber; i++) {
			CardType randomType = CardType.values()[new Random().nextInt(Card.CARD_NUMBER)];
			Card newCard = Card.getCard(randomType);
			this.cards.add(newCard);
		}
	}

	public void playCard(Card card, ActionType action, Player target) {
		switch (card.getType()) {
			case TAUPE1:
			case TAUPE2:
			case TAUPE3:
				this.playTaupe(target);
				break;
			case DOG1:
			case DOG2:
			case DOG3:
				this.playDog();
				break;
			default:
				switch (action) {
					case GIANT:
						this.playGiant(card);
						break;
					case FERTILIZER:
						this.playFertilizer(card);
						break;
					case HOBGOBLIN:
						this.playHobgoblin(card, target);
						break;
				}
		}
	}
	
	public Vector<Card> getCards () {
		return this.cards;
	}

	public Card getCardById(int cardId) {
		return this.cards.get(cardId);
	}

	private void playTaupe(Player target) {

	}

	private void playDog() {

	}

	private void playGiant (Card card) {

	}

	private void playFertilizer (Card card) {

	}

	private void playHobgoblin (Card card, Player target) {

	}

	public Field getField() {
		return this.field;
	}

	public int getNumber() {
		return this.number;
	}
}

@@ -111,16 +111,57 @@
  cards;%0A
+%09private Vector%3CAlliedCard%3E alliedCards;%0A
 %09private
@@ -239,16 +239,21 @@
 .cards  
+     
 = new Ve
@@ -273,21 +273,73 @@
 %0A%09%09this.
-field
+alliedCards = new Vector%3CAlliedCard%3E();%0A%09%09this.field     
   = new 
@@ -361,16 +361,21 @@
 .number 
+     
 = number
@@ -1160,17 +1160,88 @@
 getCards
- 
+() %7B%0A%09%09return this.cards;%0A%09%7D%0A%09%0A%09public Vector%3CAlliedCard%3E getAlliedCards
 () %7B%0A%09%09r
@@ -1243,33 +1243,39 @@
 %7B%0A%09%09return this.
-c
+alliedC
 ards;%0A%09%7D%0A%0A%09publi

Add allied cards to player