__author__ = 'Vinayak Marali'
__author__ = 'Pavan Prabhakar Bhat'

"""
CSCI-603: Lab 2 (week 2)
Section 03
Author: Pavan Prbahakar Bhat (pxb8715@rit.edu)
        Vinayak Marali (vkm7895@rit.edu)

This is a program that draws a forest with trees and a house.
"""

# Imports required by the program
import turtle
import random
import math

# global constants
UNIT = 50
# to store the height of trees
treeHt=[]


def init():
    """
    Inititializes the window for drawing. (1200,800) is the window setup
    :pre: (relative) pos(0,0), heading (east), up
    :post: relative position, heading (east), up
    :param: None
    :return: None
    """
    turtle.setup(1200, 800)
    turtle.penup()
    turtle.left(180)
    turtle.forward(10 * UNIT)
    turtle.left(90)
    turtle.forward(4 * UNIT)
    turtle.left(90)


def drawTrunk(size):
    """
    Draws the trunl of the trees on the screen
    :pre: (relative) position, heading (east), down
    :post: (relative) position, heading (east), up
    :param size: length of the tree trunk to be drawn
    :return: None
    """
    turtle.pendown()
    turtle.left(90)
    turtle.forward(size)
    turtle.penup()
    turtle.right(180)
    turtle.forward(size)
    turtle.left(90)


def drawSpace():
    """
    Draws a space between the trees or between a house and a tree.
    :pre: (relative) position, heading (east), up
    :post: (relative) position, heading (east), up
    :param: None
    :return: None