import java.awt.Color;
import java.awt.Graphics;

public class MickyMaus extends Figur {
    private Kreis kopf;

    private Kreis linkesOhr;

    private Kreis rechtesOhr;

    public MickyMaus(int x, int y, int groesse, Color color) {
        super(x, y, color);
        this.kopf = new Kreis(x, y, groesse, color);
        this.linkesOhr = new Kreis(x - groesse, y - groesse, groesse / 2, color);
        this.rechtesOhr = new Kreis(x + groesse, y - groesse, groesse / 2, color);
    }

    public void zeichneDich(Graphics graphics) {
        this.kopf.zeichneDich(graphics);
        this.linkesOhr.zeichneDich(graphics);
        this.rechtesOhr.zeichneDich(graphics);
    }

    public boolean enthaeltPunkt(int x, int y) {
        return (this.kopf.enthaeltPunkt(x, y) || this.linkesOhr.enthaeltPunkt(x, y) || this.rechtesOhr.enthaeltPunkt(x, y));
    }

    public void verschiebeUm(int x, int y) {
        this.kopf.verschiebeUm(x, y);
        this.linkesOhr.verschiebeUm(x, y);
        this.rechtesOhr.verschiebeUm(x, y);
    }

    public void verschiebeNach(int x, int y) {
        this.kopf.verschiebeNach(x, y);
        this.linkesOhr.verschiebeNach(x - this.kopf.getRadius(), y - this.kopf.getRadius());
        this.rechtesOhr.verschiebeNach(x + this.kopf.getRadius(), y - this.kopf.getRadius());
    }

    public double getFlaecheninhalt() {
        return this.kopf.getFlaecheninhalt() + 2.0D * this.linkesOhr.getFlaecheninhalt();
    }
}
