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