Initial sharing of project
This commit is contained in:
26
Aufbau2.java
Normal file
26
Aufbau2.java
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
import java.util.*;
|
||||
/**
|
||||
* Baut im Konstruktor das Szenarium auf
|
||||
*
|
||||
* @author Albert Wiedemann
|
||||
* @version 1.0
|
||||
*/
|
||||
class Aufbau2
|
||||
{
|
||||
/** der Zufallsgenerator */
|
||||
Random zufall;
|
||||
|
||||
/**
|
||||
* Legt die benötigten Objekte an.
|
||||
*/
|
||||
Aufbau2 ()
|
||||
{
|
||||
zufall = new Random();
|
||||
new RechteckBesser(zufall.nextInt(400), zufall.nextInt(200), 200, 50, "grün");
|
||||
new RechteckBesser(zufall.nextInt(400), zufall.nextInt(200), 130, 70, "blau");
|
||||
new DreieckBesser(zufall.nextInt(400) + 50, zufall.nextInt(200), 60, 50, "grün");
|
||||
new DreieckBesser(zufall.nextInt(400) + 50, zufall.nextInt(200), 70, 80, "rot");
|
||||
new KreisBesser(zufall.nextInt(400) + 50, zufall.nextInt(150) + 50, 50, "rot");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user