package domain.game.donkey.strategy;

import java.util.Set;

import domain.card.Card;
import domain.game.CardGame;
import domain.game.strategies.CardGameStrategy;
import domain.player.Player;
import domain.player.Score;
import domain.player.donkey.DonkeyHumanPlayer;


/*
 * TODO 
 * points are the amount of cards of the same value
 * the isBusted function is when the player has the full word
 */

public class DonkeyGameStrategy implements CardGameStrategy {
	private Player p;

	public DonkeyGameStrategy(Player p) {
		 setPlayer(p);
		
	}

	private void setPlayer(Player p) {
		this.p = p;
		
	}

	
	
	public Card swapCard(Player otherplayer){
		return null;
		
	}
	
	

	@Override
	public int getPoints() {
		// TODO Auto-generated method stub
		
		return p.getScore().getScore();
	}
	
	

	@Override
	public boolean isStopped() {
		// TODO when player has the whole word => game over
		if  (((DonkeyHumanPlayer) p).showLetters().length() == 4){
			return true;
		}
		
		return false;
	}

	@Override
	public void play(CardGame game, Set<Player> players, Player p) {
		while(game.getWinner() == null){
			
		}
		
	}

}

@@ -189,36 +189,8 @@
 er;%0A
-import domain.player.Score;%0A
 impo
@@ -1035,16 +1035,37 @@
 er p) %7B%0A
+%09%09game.createDeck();%0A
 %09%09while(
@@ -1091,16 +1091,143 @@
  null)%7B%0A
+%09%09%09for(Player pe : players)%7B%0A%09%09%09%09//TODO%0A%09%09%09%09/*%0A%09%09%09%09 * 1 set player active%0A%09%09%09%09 * 2. show his cards%0A%09%09%09%09 * 3. ... %0A%09%09%09%09 */%0A%09%09%09%7D%0A
 %09%09%09%0A%09%09%7D%0A

Work in progress