import javax.swing.*;
import java.awt.*;

public class Applet_Home extends JApplet
{
	private final int APPLET_WIDTH = 800;
	private final int APPLET_HEIGHT = 380;

	private int[] xHome = {200, 200, 400, 400};
	private int[] yHome = {300, 120, 120, 300};

	private int[] xRoof = {200, 300, 400};
	private int[] yRoof = {120, 80, 120};

	private int[] xW1 = {220, 220, 250, 280, 280};
	private int[] yW1 = {280, 150, 130, 150, 280};
	private int[] xW2 = {320, 320, 350, 380, 380};
	private int[] yW2 = {200, 150, 130, 150, 200};

	private int[] xW3 = {360, 360, 380, 380};
	private int[] yW3 = {300, 250, 250, 300};

	private int[] xDoor = {320, 320, 360, 360};
	private int[] yDoor = {300, 250, 250, 300};

	private int[] xGround = {130, 200, 400, 470, 440, 410, 370, 340, 300, 230, 170};
	private int[] yGround = {340, 300, 300, 340, 350, 330, 360, 340, 350, 330, 350};

	private int[] xGreen = {500, 600, 650, 700, 800, 710, 690, 650, 610, 590};
	private int[] yGreen = {240, 60, 150, 60, 240, 300, 300, 270, 300, 300};

	private int[] xTrunk1 = {590, 590, 610, 610};
	private int[] yTrunk1 = {360, 300, 300, 360};

	private int[] xTrunk2 = {690, 690, 710, 710};
	private int[] yTrunk2 = {360, 300, 300, 360};

	private int[] xY = {100, 130, 200};
	private int[] yY = {360, 340, 360};

	private int[] xM = {170, 230, 300, 280, 200};
	private int[] yM = {350, 330, 350, 360, 360};

	private int[] xC = {280, 320, 370};
	private int[] yC = {360, 340, 360};

	private int[] xO = {365, 410, 440, 420, 370};
	private int[] yO = {355, 330, 350, 360, 360};

	private int[] xR = {420, 470, 510};
	private int[] yR = {360, 340, 360};

	//private int[] xArc = {330, 330, 390, 390};
	//private int[] yArc = {360, 360, 360, 330};




	public void init()
	{
		setBackground(Color.blue);
		setSize (APPLET_WIDTH, APPLET_HEIGHT);
	}

	public void paint (Graphics g)
	{
		g.setColor (Color.white);
		g.fillPolygon (xHome, yHome, xHome.length);

		g.setColor (Color.lightGray);
		g.fillPolygon (xRoof, yRoof, xRoof.length);

		g.setColor (Color.yellow);
		g.fillPolygon (xW1, yW1, xW1.length);

		g.setColor (Color.yellow);
		g.fillPolygon (xW2, yW2, xW2.length);

		g.setColor (Color.yellow);
		g.fillPolygon (xW3, yW3, xW3.length);

		g.setColor (Color.lightGray);
		g.fillPolygon (xDoor, yDoor, xDoor.length);

		g.setColor (Color.gray);
		g.fillPolygon (xGround, yGround, xGround.length);

		g.setColor (Color.green);
		g.fillPolygon (xGreen, yGreen, xGreen.length);

		g.setColor (Color.gray);
		g.fillPolygon (xTrunk1, yTrunk1, xTrunk1.length);

		g.setColor (Color.gray);
		g.fillPolygon (xTrunk2, yTrunk2, xTrunk2.length);

		g.setColor (Color.yellow);
		g.fillPolygon (xY, yY, xY.length);

		g.setColor (Color.magenta);
		g.fillPolygon (xM, yM, xM.length);

		g.setColor (Color.cyan);
		g.fillPolygon (xC, yC, xC.length);

		g.setColor (Color.orange);
		g.fillPolygon (xO, yO, xO.length);

		g.setColor (Color.red);
		g.fillPolygon (xR, yR, xR.length);

		//g.setColor (Color.green);
		//g.fillArc (xArc, yArc, Arc.width, Arc.height, Arc.startAngle, Arc.arcAngle);

	}
}