/**
 * Bulgarian Solitaire Simulation, from Horstmann's Big Java.
 * 
 * @author jdalbey
 * @version 2014.5.9
 */
public class Solitaire
{
    /**
     * Entry point for the application.
     * 
     * @param args the desired initial collection of piles
     *        to start the game.  An array of numbers
     *        representing the piles, e.,g "2 2 4 5 6 7 8 9"
     * For correct results, the numbers must total 45,
     * the numbers are all positive.
     */
    public static void main(String[] args)
    {
    }
}
/** Game is a game of Bulgarian Solitaire.
 * @author jdalbey
 * @version 2014.5.9
 */
public final class Game
{   
    /** The board used by this game */
    private Board board;
    /** The number of rounds played so far */
    private int rounds;
    
    /** Construct a game with a random board.
    */  
    public Game()
    {
    }

    /** Construct a game and initialize the board.
     * @param initialConfig the desired initial collection of piles
     *        to start the game.  A String of blank-delimited numbers
     *        representing the piles, e.,g "2 2 4 5 6 7 8 9"
     * (Precondition: the numbers must total 45.)
     * (Precondition: the numbers are all positive.)
     * (Postcondition: board is built with initial config if provided)
    */  
    public Game(String initialConfig)
    {
    }

    /** Performs rounds until the game is over. */
    public void run()
    {
    }

    /** Accessor to number of rounds */
    public int getRounds()
    {
        return 0;
    }
}
import java.util.Collection;
import java.util.*;

/** A board is a collection of piles in Bulgarian Solitaire.
 * @author jdalbey
 * @version 2014.5.8
 */
public final class Board
{
    /** The Board is a collection of piles (integers)  */
     private List<Integer> board;
     
    /** Generate a random initial configuration.
    */
    public Board()
    {
    }
    
    /** Accessor to a copy of the board.
     * @return copy of board
     */
    List<Integer> getBoard()
    {
        return null;
    }
           
    /** Setup a desired preset initial configuration.
     * @param initialConfig the desired initial collection of piles
     *        to start the game.  A String of blank-delimited numbers
     *        representing the piles, e.,g "2 2 4 5 6 7 8 9"
     * (Precondition: the numbers must total 45.)
     * (Precondition: the numbers are all positive.)
     * (Postcondition: the board is set with the given piles)
     */
    public void setBoard(String initialConfig)
    {
    }
    
    /** Perform the "solitaire step" to determine the next configuration.
     *  Apply the rules of the game to transform the current board
     *  into the next configuration.  Specifically, take one card from each pile, 
     *  forming a new pile with these cards.
     */   
    public void playRound()
    {
    }
     
    /** Report if the board is in the winning configuration or not.
     * @return true if the board has piles of size 1, 2, 3, 4, 5, 6, 7, 8, and 9, 
     *         in some order; false, otherwise.
     */
    public boolean isWin()
    {
        return false;
    }
     
    /** Return a printable representation of this board.
     *  @return a printable representation of this board.
     */
    @Override
    public String toString()
    {
        return "";
    }
}