public class Table{
private CardDeck d;
private Card tempCard[];
private Player allPlayers[];
private int numOfPlayers = 2;
private int numOfCards = 5;

public Table(){
allPlayers = new Player[numOfPlayers];
tempCard = new Card[numOfCards];
d = new CardDeck();
}

public void run(){
for (int i = 0; i < 2; i ++){
    // draw five cards
    for (int j = 0; j < 5 ; j++)
        tempCard[j] = d.draw();
    // assign the cards to the players
    allPlayers[i] = new Player(tempCard);
//    System.out.println("Player" + i +":");
//    System.out.println(allPlayers[i]);
}

// print the cards assigned to the players
for (int i = 0; i < 2; i ++){
    System.out.println(allPlayers[i]);
}       
}

public static void main(String args[])
{
  Table myApp = new Table();
  myApp.run();
}
}

