<?xml version="1.0" encoding="UTF-8"?>
<class name="Wissenschaftler" extends="Actor" extends-java="Actor" enable="true" strideversion="1">
    <javadoc xml:space="preserve"/>
    <imports>
        <import target="java.util.*" enable="true"/>
        <import target="greenfoot.*" enable="true"/>
    </imports>
    <implements/>
    <fields>
        <variable access="private" type="Brain" type-java="Brain" name="forschungsobjekt" enable="true"/>
    </fields>
    <constructors>
        <constructor access="public" enable="true">
            <javadoc xml:space="preserve"/>
            <params/>
            <throws/>
            <body/>
        </constructor>
    </constructors>
    <methods>
        <method access="public" type="void" type-java="void" name="act" enable="true">
            <javadoc xml:space="preserve"/>
            <params/>
            <throws/>
            <body>
                <call expression="this.tastaturPruefen()" expression-java="this.tastaturPruefen()" enable="true"/>
                <call expression="this.kollisionenPruefen()" expression-java="this.kollisionenPruefen()" enable="true"/>
                <if condition="this.forschungsobjekt!=null" condition-java="this.forschungsobjekt != null" enable="true">
                    <ifStatements>
                        <if condition="Greenfoot.isKeyDown(&quot;v&quot;)" condition-java="Greenfoot.isKeyDown(&quot;v&quot;)" enable="true">
                            <ifStatements>
                                <call expression="System.out.println(&quot;Gehirn heißt &quot;+&quot;Dieter&quot;)" expression-java="System.out.println(&quot;Gehirn heißt &quot; + &quot;Dieter&quot;)" enable="true"/>
                                <comment xml:space="preserve">vorname vom Gehirn sagen, d.h. "Dieter" ersetzen durch die entsprechende Methode des Gehirns - aber erst die Aufgaben im Gehirn erledigen!</comment>
                            </ifStatements>
                        </if>
                        <if condition="Greenfoot.isKeyDown(&quot;n&quot;)" condition-java="Greenfoot.isKeyDown(&quot;n&quot;)" enable="true">
                            <ifStatements>
                                <comment xml:space="preserve">nachname vom Gehirn sagen - aber erst die Aufgaben im Gehirn erledigen!</comment>
                            </ifStatements>
                        </if>
                        <if condition="Greenfoot.isKeyDown(&quot;g&quot;)" condition-java="Greenfoot.isKeyDown(&quot;g&quot;)" enable="true">
                            <ifStatements>
                                <comment xml:space="preserve">ganzen Namen vom Gehirn sagen</comment>
                            </ifStatements>
                        </if>
                        <if condition="Greenfoot.isKeyDown(&quot;b&quot;)" condition-java="Greenfoot.isKeyDown(&quot;b&quot;)" enable="true">
                            <ifStatements>
                                <call expression="this.getWorld().showText(&quot;Der Bruttobetrag ist &quot;+111,200,300)" expression-java="this.getWorld().showText(&quot;Der Bruttobetrag ist &quot; + 111, 200, 300)" enable="true"/>
                                <comment xml:space="preserve">ersetzen Sie die 111 durch die entsprechende Methode vom Gehirn</comment>
                            </ifStatements>
                        </if>
                        <if condition="Greenfoot.isKeyDown(&quot;k&quot;)" condition-java="Greenfoot.isKeyDown(&quot;k&quot;)" enable="true">
                            <ifStatements>
                                <variable type="String" type-java="String" name="radiusAlsString" value="Greenfoot.ask(&quot;Sag einen Radius ...&quot;)" value-java="Greenfoot.ask(&quot;Sag einen Radius ...&quot;)" enable="true"/>
                                <variable type="double" type-java="double" name="radius" value="Double.parseDouble(radiusAlsString)" value-java="Double.parseDouble(radiusAlsString)" enable="true"/>
                                <comment xml:space="preserve">hier den Kreisumfang sagen (this.getWorld().showText("Kreisumfang ist 27", 200, 500), die 27 wird natürlich vom Gehirn berechnet - wie beim Bruttobetrag </comment>
                            </ifStatements>
                        </if>
                        <if condition="Greenfoot.isKeyDown(&quot;x&quot;)" condition-java="Greenfoot.isKeyDown(&quot;x&quot;)" enable="true">
                            <ifStatements>
                                <comment xml:space="preserve">hier holen Sie mit der entsprechenden Methode die x-Position des Gehirns (statt der 99999)</comment>
                                <variable type="int" type-java="int" name="xPosVomGehirn" value="99999" value-java="99999" enable="true"/>
                                <call expression="System.out.println(&quot;Gehirns x-Position ist &quot;+xPosVomGehirn)" expression-java="System.out.println(&quot;Gehirns x-Position ist &quot; + xPosVomGehirn)" enable="true"/>
                                <comment xml:space="preserve">das könnte man auch noch einfacher machen - ohne eigene Methode. Wie?</comment>
                                <comment xml:space="preserve">hier holen Sie die Rotation des Gehirns (statt der 9999)</comment>
                                <variable type="int" type-java="int" name="rotationVomGehirn" value="99999" value-java="99999" enable="true"/>
                                <call expression="System.out.println(&quot;Gehirns Rotation ist &quot;+rotationVomGehirn)" expression-java="System.out.println(&quot;Gehirns Rotation ist &quot; + rotationVomGehirn)" enable="true"/>
                            </ifStatements>
                        </if>
                    </ifStatements>
                </if>
            </body>
        </method>
        <method access="public" type="void" type-java="void" name="kollisionenPruefen" enable="true">
            <javadoc xml:space="preserve"/>
            <params/>
            <throws/>
            <body>
                <if condition="this.isTouching(Brain.class)" condition-java="this.isTouching(Brain.class)" enable="true">
                    <ifStatements>
                        <assign dest="this.forschungsobjekt" dest-java="this.forschungsobjekt" src="(Brain)this.getOneIntersectingObject(Brain.class)" src-java="(Brain)this.getOneIntersectingObject(Brain.class)" enable="true"/>
                    </ifStatements>
                </if>
            </body>
        </method>
        <method access="public" type="void" type-java="void" name="tastaturPruefen" enable="true">
            <javadoc xml:space="preserve"/>
            <params/>
            <throws/>
            <body>
                <if condition="Greenfoot.isKeyDown(&quot;space&quot;)" condition-java="Greenfoot.isKeyDown(&quot;space&quot;)" enable="true">
                    <ifStatements>
                        <call expression="this.move(4)" expression-java="this.move(4)" enable="true"/>
                    </ifStatements>
                </if>
                <if condition="Greenfoot.isKeyDown(&quot;left&quot;)" condition-java="Greenfoot.isKeyDown(&quot;left&quot;)" enable="true">
                    <ifStatements>
                        <call expression="this.turn(-3)" expression-java="this.turn(-3)" enable="true"/>
                    </ifStatements>
                </if>
                <if condition="Greenfoot.isKeyDown(&quot;right&quot;)" condition-java="Greenfoot.isKeyDown(&quot;right&quot;)" enable="true">
                    <ifStatements>
                        <call expression="this.turn(3)" expression-java="this.turn(3)" enable="true"/>
                    </ifStatements>
                </if>
            </body>
        </method>
    </methods>
</class>
