/**
 * Name : Paul He
 * PennKey : paulhe
 *
 * Execution: java MyHouse
 *
 * An example drawing using the PennDraw library. This draws a house in the
 * middle of a green field with a blue sky.
 */

public class MyHouse {
    public static void main(String[] args) {

        // Make our window 500 pixels wide and 500 pixels tall.
        PennDraw.setCanvasSize(500, 500);

        // Draw a blue background for our sky
        PennDraw.clear(PennDraw.BLUE);

        // Draw a green rectangle as the ground
        PennDraw.setPenColor(0, 170, 0);
        PennDraw.filledRectangle(0.5, 0.25, 0.5, 0.25);

        // Draw the house, which is a triangle roof and a rectangle wall.
        PennDraw.setPenColor(200, 170, 0);
        PennDraw.filledPolygon(0.255, 0.70, 0.745, 0.70, 0.49, 0.90);
        PennDraw.filledRectangle(0.5, 0.52, 0.24, 0.18);

        // Set the pen color to black and draw outlines around the shapes
        // that make up the house.
        PennDraw.setPenRadius(0.005);
        PennDraw.setPenColor(PennDraw.BLACK);
        PennDraw.polygon(0.255, 0.70, 0.745, 0.70, 0.49, 0.90);
        PennDraw.rectangle(0.5, 0.52, 0.24, 0.18);

    }
}
