import java.io.*;

/**
 * A deck of playing cards.
 *
 * You must not modify this class.
 */
 
public interface Deck {

    /**
     * Read in the deck of cards from `stream'.
     *
     * @param MyStreamTokenizer stream the input stream for
     *        card names.
     */

    public void loadDeck(MyStreamTokenizer stream) throws IOException;
    
    /**
     * Randomly reorder the cards in my deck.
     *
     * @param MyRandom randomStream a stream of random
     *        numbers.
     */
    public void shuffle(MyRandom randomStream);
    
    /**
     * Return the top card in my deck.
     * Precondition: My deck is not empty.
     *
     * @return Card the top card in my deck.
     */

    public Card topCard();
    
    /**
     * Return the bottom card in my deck.  
     * Precondition: My deck is not empty.
     *
     * @return Card the bottom card in my deck.
     */

    public Card bottomCard();
    
    /**
     * Remove and return the top card in my deck.
     * Precondition: My deck is not empty.
     *
     * @return Card the top card in my deck.
     */

    public Card dealTop();
    
    /**
     * Remove and return the bottom card in my deck.  
     * Precondition: My deck is not empty.
     *
     * @return Card the bottom card in my deck.
     */

    public Card dealBottom();

    /**
     * Returns the number of cards remaining in my deck.
     *
     * @return int the number of cards remaining in my deck.
     */

    public int remainingCards();
    
    /**
     * Deal the cards in my deck to `n' players.  That is, print `n' columns 
     * showing what cards each of the players gets.
     *
     * @param int n the number of players, ie. the number of columns.
     */

    public void deal(int n); 
}    
