Package games.blackjack

Source Code of games.blackjack.Dealer

/**
* Author: Joshua McMillen
*/
package games.blackjack;

import java.util.ArrayList;
import game.Card;
import games.blackjack.commands.BuildDealerList;
import games.blackjack.commands.CommandList;
/**
* Controller for the Dealer
*/
public class Dealer
{
  //Initialize commands, hand, and AI.
  private CommandList commL = new CommandList();
  private ArrayList<Card> hand;
  private AI diff;
 
  public Dealer()
  {
    this(new Average());
    setHand(new ArrayList<Card>());
  }
  //Construct Commands and set AI
  public Dealer(AI diff)
  {   
    BuildDealerList commB = new BuildDealerList();
    commB.createList(getCommL());
    setDiff(diff);   
  }
 
  //returns commands
  public CommandList getCommL()
  {
    return commL;
  }
 
  //sets commands
  public void setCommL(CommandList commL)
  {
    this.commL = commL;
  }
 
  //returns hand
  public ArrayList<Card> getHand()
  {
    return hand;
  }
 
  //sets hand
  public void setHand(ArrayList<Card> hand)
  {
    this.hand = hand;
  }
 
  //returns AI
  public AI getDiff()
  {
    return diff;
  }
 
  //sets AI
  public void setDiff(AI diff)
  {
    this.diff = diff;
 

}

TOP

Related Classes of games.blackjack.Dealer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.