27 lines
776 B
Java
27 lines
776 B
Java
|
|
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");
|
|
}
|
|
}
|