// Path: src/main/java/org/gnubridge/core/deck/Ace.java
// public class Ace {
// 	public static Card of(Suit denomination) {
// 		return new Card("A", denomination);
// 	}
// 
// 	public static boolean isValueOf(Card card) {
// 		return card.getValue() == Card.strToIntValue("A");
// 	}
// 
// }
// 
// Path: src/main/java/org/gnubridge/core/deck/Hearts.java
// public class Hearts extends Suit {
// 
// 	private static Hearts instance;
// 
// 	private Hearts() {
// 		super();
// 	}
// 	
// 	public static Hearts i() {
// 		if (instance == null) {
// 			instance = new Hearts();
// 		}
// 		return instance ;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "HEARTS";
// 	}
// 	
// 	@Override
// 	public String toDebugString() {
// 		return "Hearts.i()";
// 	}
// 
// }
// 
// Path: src/main/java/org/gnubridge/core/deck/NoTrump.java
// public class NoTrump extends Trump {
// 
// 	private static NoTrump instance = new NoTrump();
// 
// 	private NoTrump() {
// 		super();
// 	}
// 	
// 	public static NoTrump i() {
// 		return instance ;
// 	}	
// 
// 	@Override
// 	public String toString() {
// 		return "NT";
// 	}
// 
// 	@Override
// 	public String toDebugString() {
// 		return "NoTrump.i()";
// 	}
// 
// }


import java.util.ArrayList;
import java.util.List;
import junit.framework.TestCase;
import org.gnubridge.core.deck.Ace;
import org.gnubridge.core.deck.Clubs;
import org.gnubridge.core.deck.Diamonds;
import org.gnubridge.core.deck.Hearts;
import org.gnubridge.core.deck.NoTrump;
import org.gnubridge.core.deck.Spades;
import org.gnubridge.core.deck.Two;
import org.gnubridge.presentation.GameUtils;
		assertTrue("not ended, but all cards have been played", game.isDone());
	}

	public void testGameEndsWhen52CardsPlayed() {
		GameUtils.initializeSingleColorSuits(game);
		int cardCount = 0;
		while (!game.isDone()) {
			assertNotSame("Ran out of cards, but game not finished", 52, cardCount);
			game.doNextCard();
			cardCount++;

		}
		assertEquals(52, cardCount);
	}

	public void testPreviousTrickTakerFirstToPlay() {
		game.getPlayer(Direction.WEST_DEPRECATED).init(Ace.of(Hearts.i()), Two.of(Spades.i()));
		game.getPlayer(Direction.NORTH_DEPRECATED).init(Ace.of(Diamonds.i()), Two.of(Hearts.i()));
		game.getPlayer(Direction.SOUTH_DEPRECATED).init(Two.of(Diamonds.i()), Ace.of(Spades.i()));
		game.getPlayer(Direction.EAST_DEPRECATED).init(Ace.of(Clubs.i()), Two.of(Clubs.i()));
		assertEquals(game.getPlayer(Direction.WEST_DEPRECATED), game.getNextToPlay());
		playTrick(game);
		assertEquals(game.getPlayer(Direction.SOUTH_DEPRECATED), game.getNextToPlay());

	}

	public void testGameKeepsTrackOfTricksTaken() {
		game.getPlayer(Direction.WEST_DEPRECATED).init(Ace.of(Hearts.i()), Two.of(Spades.i()));
		game.getPlayer(Direction.NORTH_DEPRECATED).init(Ace.of(Diamonds.i()), Two.of(Hearts.i()));
		game.getPlayer(Direction.SOUTH_DEPRECATED).init(Two.of(Diamonds.i()), Ace.of(Spades.i()));
// Path: src/main/java/org/gnubridge/core/deck/Ace.java
// public class Ace {
// 	public static Card of(Suit denomination) {
// 		return new Card("A", denomination);
// 	}
// 
// 	public static boolean isValueOf(Card card) {
// 		return card.getValue() == Card.strToIntValue("A");
// 	}
// 
// }
// 
// Path: src/main/java/org/gnubridge/core/deck/Hearts.java
// public class Hearts extends Suit {
// 
// 	private static Hearts instance;
// 
// 	private Hearts() {
// 		super();
// 	}
// 	
// 	public static Hearts i() {
// 		if (instance == null) {
// 			instance = new Hearts();
// 		}
// 		return instance ;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "HEARTS";
// 	}
// 	
// 	@Override
// 	public String toDebugString() {
// 		return "Hearts.i()";
// 	}
// 
// }
// 
// Path: src/main/java/org/gnubridge/core/deck/NoTrump.java
// public class NoTrump extends Trump {
// 
// 	private static NoTrump instance = new NoTrump();
// 
// 	private NoTrump() {
// 		super();
// 	}
// 	
// 	public static NoTrump i() {
// 		return instance ;
// 	}	
// 
// 	@Override
// 	public String toString() {
// 		return "NT";
// 	}
// 
// 	@Override
// 	public String toDebugString() {
// 		return "NoTrump.i()";
// 	}
// 
// }


// Path: src/test/java/org/gnubridge/core/DealTest.java
import java.util.ArrayList;
import java.util.List;
import junit.framework.TestCase;
import org.gnubridge.core.deck.Ace;
import org.gnubridge.core.deck.Clubs;
import org.gnubridge.core.deck.Diamonds;
import org.gnubridge.core.deck.Hearts;
import org.gnubridge.core.deck.NoTrump;
import org.gnubridge.core.deck.Spades;
import org.gnubridge.core.deck.Two;
import org.gnubridge.presentation.GameUtils;

		assertTrue("not ended, but all cards have been played", game.isDone());
	}

	public void testGameEndsWhen52CardsPlayed() {
		GameUtils.initializeSingleColorSuits(game);
		int cardCount = 0;
		while (!game.isDone()) {
			assertNotSame("Ran out of cards, but game not finished", 52, cardCount);
			game.doNextCard();
			cardCount++;

		}
		assertEquals(52, cardCount);
	}

	public void testPreviousTrickTakerFirstToPlay() {
		game.getPlayer(Direction.WEST_DEPRECATED).init(Ace.of(Hearts.i()), Two.of(Spades.i()));
		game.getPlayer(Direction.NORTH_DEPRECATED).init(Ace.of(Diamonds.i()), Two.of(Hearts.i()));
		game.getPlayer(Direction.SOUTH_DEPRECATED).init(Two.of(Diamonds.i()), Ace.of(Spades.i()));
		game.getPlayer(Direction.EAST_DEPRECATED).init(Ace.of(Clubs.i()), Two.of(Clubs.i()));
		assertEquals(game.getPlayer(Direction.WEST_DEPRECATED), game.getNextToPlay());
		playTrick(game);
		assertEquals(game.getPlayer(Direction.SOUTH_DEPRECATED), game.getNextToPlay());

	}

	public void testGameKeepsTrackOfTricksTaken() {
		game.getPlayer(Direction.WEST_DEPRECATED).init(Ace.of(Hearts.i()), Two.of(Spades.i()));
		game.getPlayer(Direction.NORTH_DEPRECATED).init(Ace.of(Diamonds.i()), Two.of(Hearts.i()));
		game.getPlayer(Direction.SOUTH_DEPRECATED).init(Two.of(Diamonds.i()), Ace.of(Spades.i()));
		game.getPlayer(Direction.EAST_DEPRECATED).init(Ace.of(Clubs.i()), Two.of(Clubs.i()));