// Path: src/main/java/org/gnubridge/core/deck/Suit.java
// public abstract class Suit extends Trump {
// 
// 	//note, DO NOT USE statics from Trump here, ie SPADES instead of Spades.i()
// 	public static final Suit[] list = { Spades.i(), Hearts.i(), Diamonds.i(), Clubs.i() };
// 	public static final Suit[] reverseList = { Clubs.i(), Diamonds.i(), Hearts.i(), Spades.i(), };
// 	public static final Suit[] mmList = { Hearts.i(), Spades.i(), Clubs.i(), Diamonds.i() };
// 
// 	public static int getIndex(Suit denomination) {
// 		int result = -1;
// 		for (Suit suit : reverseList) {
// 			result++;
// 			if (suit.equals(denomination)) {
// 				break;
// 			}
// 		}
// 		return result;
// 	}
// 
// 	@Override
// 	public abstract String toDebugString();
// 
// 	public boolean isLowerRankThan(Trump other) {
// 		if (other.isNoTrump()) {
// 			return true;
// 		}
// 		return getIndex(this) < getIndex(other.asSuit());
// 	}
// 
// 	public static Suit get(String s) {
// 		if ("S".equals(s)) {
// 			return Spades.i();
// 		} else if ("H".equals(s)) {
// 			return Hearts.i();
// 		} else if ("D".equals(s)) {
// 			return Diamonds.i();
// 		} else if ("C".equals(s)) {
// 			return Clubs.i();
// 		} else {
// 			throw new RuntimeException("do not know how to translate string '" + s
// 					+ "' to a suit (need one of: S,H,D,C)");
// 		}
// 	}
// }
// 
// Path: src/main/java/org/gnubridge/core/deck/Trump.java
// public abstract class Trump {
// 
// 	public static final Suit CLUBS = Clubs.i();
// 	public static final Suit DIAMONDS = Diamonds.i();
// 	public static final Suit HEARTS = Hearts.i();
// 	public static final Suit SPADES = Spades.i();
// 	public static final Trump NOTRUMP = NoTrump.i();
// 
// 	@Override
// 	public abstract String toString();
// 
// 	public static Trump instance(String s) {
// 		Trump result = null;
// 		if (NoTrump.i().toString().equalsIgnoreCase(s)) {
// 			result = NoTrump.i();
// 		} else if (Spades.i().toString().equalsIgnoreCase(s)) {
// 			result = Spades.i();
// 		} else if (Hearts.i().toString().equalsIgnoreCase(s)) {
// 			result = Hearts.i();
// 		} else if (Diamonds.i().toString().equalsIgnoreCase(s)) {
// 			result = Diamonds.i();
// 		} else if (Clubs.i().toString().equalsIgnoreCase(s)) {
// 			result = Clubs.i();
// 		}
// 		return result;
// 	}
// 
// 	public abstract String toDebugString();
// 
// 	public boolean isMajorSuit() {
// 		return Spades.i().equals(this) || Hearts.i().equals(this);
// 	}
// 
// 	public Suit asSuit() {
// 		if (this instanceof Suit) {
// 			return (Suit) this;
// 		} else {
// 			throw new RuntimeException("Trying to treat " + this + " as suit.");
// 		}
// 	}
// 
// 	public boolean isMinorSuit() {
// 		return Diamonds.i().equals(this) || Clubs.i().equals(this);
// 	}
// 
// 	public boolean isSuit() {
// 		return isMajorSuit() || isMinorSuit();
// 	}
// 
// 	public boolean isNoTrump() {
// 		return NoTrump.i().equals(this);
// 	}
// }


import java.util.ArrayList;
import java.util.List;
import org.gnubridge.core.deck.Suit;
import org.gnubridge.core.deck.Trump;
import org.gnubridge.presentation.GameUtils;
package org.gnubridge.core;



public class Deal {

	private static Deal preInitializedGame;

	private final Player[] players;

	int nextToPlay;

	Trick currentTrick;

	protected boolean done;

// Path: src/main/java/org/gnubridge/core/deck/Suit.java
// public abstract class Suit extends Trump {
// 
// 	//note, DO NOT USE statics from Trump here, ie SPADES instead of Spades.i()
// 	public static final Suit[] list = { Spades.i(), Hearts.i(), Diamonds.i(), Clubs.i() };
// 	public static final Suit[] reverseList = { Clubs.i(), Diamonds.i(), Hearts.i(), Spades.i(), };
// 	public static final Suit[] mmList = { Hearts.i(), Spades.i(), Clubs.i(), Diamonds.i() };
// 
// 	public static int getIndex(Suit denomination) {
// 		int result = -1;
// 		for (Suit suit : reverseList) {
// 			result++;
// 			if (suit.equals(denomination)) {
// 				break;
// 			}
// 		}
// 		return result;
// 	}
// 
// 	@Override
// 	public abstract String toDebugString();
// 
// 	public boolean isLowerRankThan(Trump other) {
// 		if (other.isNoTrump()) {
// 			return true;
// 		}
// 		return getIndex(this) < getIndex(other.asSuit());
// 	}
// 
// 	public static Suit get(String s) {
// 		if ("S".equals(s)) {
// 			return Spades.i();
// 		} else if ("H".equals(s)) {
// 			return Hearts.i();
// 		} else if ("D".equals(s)) {
// 			return Diamonds.i();
// 		} else if ("C".equals(s)) {
// 			return Clubs.i();
// 		} else {
// 			throw new RuntimeException("do not know how to translate string '" + s
// 					+ "' to a suit (need one of: S,H,D,C)");
// 		}
// 	}
// }
// 
// Path: src/main/java/org/gnubridge/core/deck/Trump.java
// public abstract class Trump {
// 
// 	public static final Suit CLUBS = Clubs.i();
// 	public static final Suit DIAMONDS = Diamonds.i();
// 	public static final Suit HEARTS = Hearts.i();
// 	public static final Suit SPADES = Spades.i();
// 	public static final Trump NOTRUMP = NoTrump.i();
// 
// 	@Override
// 	public abstract String toString();
// 
// 	public static Trump instance(String s) {
// 		Trump result = null;
// 		if (NoTrump.i().toString().equalsIgnoreCase(s)) {
// 			result = NoTrump.i();
// 		} else if (Spades.i().toString().equalsIgnoreCase(s)) {
// 			result = Spades.i();
// 		} else if (Hearts.i().toString().equalsIgnoreCase(s)) {
// 			result = Hearts.i();
// 		} else if (Diamonds.i().toString().equalsIgnoreCase(s)) {
// 			result = Diamonds.i();
// 		} else if (Clubs.i().toString().equalsIgnoreCase(s)) {
// 			result = Clubs.i();
// 		}
// 		return result;
// 	}
// 
// 	public abstract String toDebugString();
// 
// 	public boolean isMajorSuit() {
// 		return Spades.i().equals(this) || Hearts.i().equals(this);
// 	}
// 
// 	public Suit asSuit() {
// 		if (this instanceof Suit) {
// 			return (Suit) this;
// 		} else {
// 			throw new RuntimeException("Trying to treat " + this + " as suit.");
// 		}
// 	}
// 
// 	public boolean isMinorSuit() {
// 		return Diamonds.i().equals(this) || Clubs.i().equals(this);
// 	}
// 
// 	public boolean isSuit() {
// 		return isMajorSuit() || isMinorSuit();
// 	}
// 
// 	public boolean isNoTrump() {
// 		return NoTrump.i().equals(this);
// 	}
// }


// Path: src/main/java/org/gnubridge/core/Deal.java
import java.util.ArrayList;
import java.util.List;
import org.gnubridge.core.deck.Suit;
import org.gnubridge.core.deck.Trump;
import org.gnubridge.presentation.GameUtils;

package org.gnubridge.core;



public class Deal {

	private static Deal preInitializedGame;

	private final Player[] players;

	int nextToPlay;

	Trick currentTrick;

	protected boolean done;

	private Trump trump;