/**
 * This class can take a variable number of parameters on the command
 * line. Program execution begins with the main() method. The class
 * constructor is not invoked unless an object of type 'Class1'
 * created in the main() method.
 */
import java.applet.Applet;
import java.awt.*;

public class DiceApplet extends Applet
{
   /**
    * The main entry point for the application. 
    *
    * @param args Array of parameters passed to the application
    * via the command line.
    */
   
   public static void main (String[] args)
   {
      
   }

   
   public void paint (Graphics g) {
      // Create a DiceDisplay of a 100x100 dice with left corner (50,30)
      DiceDisplay aDisp = new DiceDisplay(100, 50, 30);
      aDisp.drawDice(g, 1);  // Draw aDisp showing a 1

	DiceDisplay anotherDisp = new DiceDisplay(50, 50, 100);
   
      // Draw the new DiceDisplay showing a 2
	anotherDisp.setPosition(50, 150);
  	anotherDisp.drawDice(g, 2);
      
      //Create a dice with a 3 and show pips in red
	anotherDisp.setPosition(100, 150);
	anotherDisp.setPipColor(g, Color.red);
 	anotherDisp.drawDice(g, 3);


      
      //Create a dice with a four and show pips in blue
	anotherDisp.setPosition(150, 150);
	anotherDisp.setPipColor(g, Color.blue);
	anotherDisp.drawDice(g, 4);


      
      //Create a dice with a five and show pips in black
	anotherDisp.setPosition(200, 150);
	anotherDisp.setPipColor(g, Color.black);
	anotherDisp.drawDice(g, 5);


      
      //Create a dice with a six and show pips in green
	anotherDisp.setPosition(250, 150);
	anotherDisp.setSize(100);
	anotherDisp.setPipColor(g, Color.green);
	anotherDisp.drawDice(g, 6);
   }
}

