/*
* 12:31:31
* vjanssen
*/
package a0902d_f_Philosophen_VORLAGE;

import java.awt.Color;
import java.awt.Graphics;

public class AF_Gabel extends AbsForm
{
	public AF_Gabel ()
	{
		this(173, 220, 30, Color.BLACK);
	}
	
	public AF_Gabel (int x, int y, int laenge, Color farbe)
	{
		super(x, y, laenge, farbe);
	}
	
	public void drawObjekt (Graphics g, int xVer, int yVer)
	{
		int x = this.getX() + xVer;
		int y = this.getY() + yVer;
		int l = this.getLaenge();
		
		g.setColor(this.getFarbe());
		
		g.drawLine(x, y, x, y-l);
		
		int[] xPolygon = {	x - (int)(l/8), x - (int)(l/8),	x + (int)(l/8), x + (int)(l/8) };		
		int[] yPolygon = {	y - l, y - l + (int)(l/4), y - l + (int)(l/4), y - l };
	
		g.drawPolyline(xPolygon, yPolygon, 4);
	}
}
