fast fast fertig
This commit is contained in:
parent
3909cc0e6e
commit
401897a492
@ -35,11 +35,16 @@ public class Beet extends Gartenkomponente
|
|||||||
this.pflgruppe = pflgruppe;
|
this.pflgruppe = pflgruppe;
|
||||||
}
|
}
|
||||||
public ArrayList<Pflanze> getPflanzenausgruppe()
|
public ArrayList<Pflanze> getPflanzenausgruppe()
|
||||||
{
|
{
|
||||||
System.out.println("Beet frägt nach seinen Pflanzen");
|
|
||||||
System.out.println(pflgruppe.getPflanzeninGruppe());
|
|
||||||
|
|
||||||
return pflgruppe.getPflanzeninGruppe();
|
return pflgruppe.getPflanzeninGruppe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArrayList<Pflanze> removePlfanzenGruppenBeet()
|
||||||
|
{
|
||||||
|
ArrayList<Pflanze> tempfl = new ArrayList<>();
|
||||||
|
tempfl.addAll(pflgruppe.getPflanzeninGruppe());
|
||||||
|
this.pflgruppe = null;
|
||||||
|
return tempfl;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -217,6 +217,10 @@ public class Gaertner implements MouseMotionListener, MouseListener,ActionListen
|
|||||||
konfig.startlaenge(laenge);
|
konfig.startlaenge(laenge);
|
||||||
konfig.beet(meinGarten.getBeet(koordinbeet));
|
konfig.beet(meinGarten.getBeet(koordinbeet));
|
||||||
konfig.erstellen();
|
konfig.erstellen();
|
||||||
|
|
||||||
|
//ArrayList<Pflanze> tempfl = meinGarten.getBeet(koordinbeet).removePlfanzenGruppenBeet();
|
||||||
|
//meinGarten.removePflanzen(tempfl);
|
||||||
|
|
||||||
for(Pflanze pf : meinGarten.getBeet(koordinbeet).getPflanzenausgruppe())
|
for(Pflanze pf : meinGarten.getBeet(koordinbeet).getPflanzenausgruppe())
|
||||||
{
|
{
|
||||||
meinGarten.hinzufuegenPflanze(pf);
|
meinGarten.hinzufuegenPflanze(pf);
|
||||||
|
@ -217,4 +217,11 @@ public class Garten extends Kompositum
|
|||||||
zeichnePflanzen();
|
zeichnePflanzen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removePflanzen(ArrayList<Pflanze> pfl)
|
||||||
|
{
|
||||||
|
for(Pflanze p: pfl)
|
||||||
|
{
|
||||||
|
pflanzen.remove(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,10 +10,16 @@ package garten.model;
|
|||||||
*
|
*
|
||||||
* @author Jan
|
* @author Jan
|
||||||
*/
|
*/
|
||||||
public class Kompositum
|
public class Kompositum extends Gartenkomponente
|
||||||
{
|
{
|
||||||
|
int flaeche;
|
||||||
public Kompositum()
|
public Kompositum()
|
||||||
{
|
{
|
||||||
|
flaeche = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int flaeche()
|
||||||
|
{
|
||||||
|
return flaeche();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user