import sum.kern.*;

public class Gueterwagen extends Waggon
{
    public Gueterwagen(int pH, int pV)
    {
        super (pH, pV);
        setzeLaenge(110);
    }

    protected void zeichne()
    {
        double lH, lV;
        
        lH = hatStift.hPosition();
        lV = hatStift.vPosition();
        
		hatStift.runter();
		
		//Puffer links
		hatStift.dreheBis(90); //oben
		hatStift.bewegeUm(3);
		hatStift.dreheUm(180); //unten
		hatStift.bewegeUm(6);
		hatStift.dreheUm(180); //oben
		hatStift.bewegeUm(3);
		hatStift.dreheUm(270); //rechts
		hatStift.bewegeUm(5);
		
		//Boden
		hatStift.hoch();
		hatStift.dreheUm(90); //oben
		hatStift.bewegeUm(10);
		hatStift.zeichneRechteck(100,15);
		
		//Wand links
		hatStift.bewegeUm(30);
		hatStift.dreheUm(-90); //rechts
		hatStift.bewegeUm(1);
		hatStift.zeichneRechteck(5,30);
		
		//Wand rechts
		hatStift.bewegeUm(93);
		hatStift.zeichneRechteck(5,30);
		
		//Raeder
		hatStift.bewegeUm(-4);
		hatStift.dreheUm(270); //unten
		hatStift.bewegeUm(50);
		hatStift.zeichneKreis(5);
		hatStift.dreheUm(90);  //rechts
		hatStift.bewegeUm(-80);
		hatStift.zeichneKreis(5);
		hatStift.bewegeUm(90);
		hatStift.dreheUm(90); //oben
		hatStift.bewegeUm(10);
		
		//Puffer rechts
		hatStift.runter();
		hatStift.dreheUm(270); //rechts
		hatStift.bewegeUm(5);
		hatStift.dreheUm(90);  //oben
		hatStift.bewegeUm(3);
		hatStift.dreheUm(180); //unten
		hatStift.bewegeUm(6);
		hatStift.dreheUm(180); //oben
		hatStift.bewegeUm(3);
		
		// zurueck zur Ausgangsposition
		hatStift.hoch();
		hatStift.bewegeBis(lH, lV);
		hatStift.dreheBis(0);
    }

}
