Revert "Spielstart patch"

master
Felix Stupp 8 years ago committed by GitHub
parent 61bc5887f4
commit 839cd3b1b0

@ -10,12 +10,12 @@ import javax.swing.JOptionPane;
*/
public class Colours extends World implements ButtonEvent
{
Bildbutton schwarz = new Bildbutton (new GreenfootImage("SchwarzeArmeeSkal.png"), this);
Bildbutton blau = new Bildbutton (new GreenfootImage("BlaueArmeeSkal.png"), this);
Bildbutton rot = new Bildbutton (new GreenfootImage("RoteArmeeSkal.png"), this);
Bildbutton gelb = new Bildbutton (new GreenfootImage("GelbeArmeeSkal.png"), this);
Bildbutton lila = new Bildbutton (new GreenfootImage("LilaArmeeSkal.png"), this);
Bildbutton grün = new Bildbutton (new GreenfootImage("GrueneArmeeSkal.png"), this);
Button schwarz = new Button ("Schwarz", 16, this);
Button blau = new Button ("Blau", 16, this);
Button grün = new Button ("Grün", 16, this);
Button rot = new Button ("Rot", 16, this);
Button lila = new Button ("Lila", 16, this);
Button gelb = new Button ("Gelb", 16, this);
Button weiter = new Button ("Weiter", 16, this);
int[] color = new int [5];
String[] pn = new String [5];
@ -35,11 +35,11 @@ public class Colours extends World implements ButtonEvent
Label header = new Label("Klicke auf eine Farbe, um einen Spieler hinzuzufügen:",16);
Button remove = new Button("Rückgängig",16,this);
Label pl1 = new Label("",22);
Label pl2 = new Label("",22);
Label pl3 = new Label("",22);
Label pl4 = new Label("",22);
Label pl5 = new Label("",22);
Label pl1 = new Label("",16);
Label pl2 = new Label("",16);
Label pl3 = new Label("",16);
Label pl4 = new Label("",16);
Label pl5 = new Label("",16);
/**
* Constructor for objects of class Colors.
@ -50,41 +50,35 @@ public class Colours extends World implements ButtonEvent
super(x, y, z);
setBackground(Start_Load.backgroundImage);
Bildbutton[] bList = new Bildbutton[] {schwarz,gelb,blau,grün,rot,lila,weiter,remove};
Button[] bList = new Button[] {schwarz,gelb,blau,grün,rot,lila,weiter,remove};
Label[] lList = new Label[] {header,pl1,pl2,pl3,pl4,pl5};
addObject(header,200,15);
addObject(schwarz, 80, 50);
addObject ( blau, 240, 50);
addObject ( grün, 400, 50);
addObject ( rot, 560, 50);
addObject(gelb, 720, 50);
addObject(lila, 880, 50);
addObject(remove,300,160);
addObject (weiter, 510,160);
addObject(schwarz, 70, 50);
addObject ( blau, 190, 50);
addObject ( grün, 300, 50);
addObject ( rot, 410, 50);
addObject(gelb, 520, 50);
addObject(lila, 630, 50);
addObject(remove,300,110);
addObject (weiter, 410,110);
addObject(pl1,355,360);
addObject(pl2,355,380);
addObject(pl3,355,400);
addObject(pl4,355,420);
addObject(pl5,355,440);
addObject(pl1,355,160);
addObject(pl2,355,180);
addObject(pl3,355,200);
addObject(pl4,355,220);
addObject(pl5,355,240);
//schwarz.setForeColor(Color.black);
//gelb.setForeColor(Color.yellow);
//blau.setForeColor(Color.blue);
//grün.setForeColor(Color.green);
//rot.setForeColor(Color.red);
//lila.setForeColor(new Color(161,70,255));
pl1.setForeColor(Color.black);
pl2.setForeColor(Color.black);
pl3.setForeColor(Color.black);
pl4.setForeColor(Color.black);
pl5.setForeColor(Color.black);
schwarz.setForeColor(Color.black);
gelb.setForeColor(Color.yellow);
blau.setForeColor(Color.blue);
grün.setForeColor(Color.green);
rot.setForeColor(Color.red);
lila.setForeColor(new Color(161,70,255));
for(int i = 0; i < bList.length; i++) {
bList[i].setSize(164,100);
bList[i].setSize(100,50);
}
for(int i = 0; i < lList.length; i++) {
lList[i].setBackColor(new Color(0,0,0,0));
@ -100,7 +94,7 @@ public class Colours extends World implements ButtonEvent
// verhindert durch falschsetzten einer Variable die Wiederauswahl einer Farbe
// wenn Weiter geklickt wurde und x größer 1 ist wird eine neue Welt Map erzeugt,
//der per Konstruktor die Daten der Colorklasse übertragen werden, dannach wird die Map die aktive Welt
public void buttonClicked (Bildbutton b)
public void buttonClicked (Button b)
{
if (x < 5) {
if (b == schwarz && possw == true) {

@ -8,8 +8,8 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
*/
public class Map extends World implements ButtonEvent
{
Bildbutton map1 = new Bildbutton (new GreenfootImage("WeltkarteSkal.png"), this);
Bildbutton map2 = new Bildbutton (new GreenfootImage("USAKarteSkal.png"), this);
private Button map1 = new Button ("map1",16,this);
private Button map2 = new Button ("map2",16,this);
private Button fertigst = new Button (" Fertigstellen",16,this);
int[] colour;
String[] pn;
@ -32,11 +32,11 @@ public class Map extends World implements ButtonEvent
pn[i] = name[i];
}
pnu=zahl;
addObject(map1, 200, 80);
addObject(map2, 470, 80);
addObject(fertigst,330,200 );
map1.setSize(164, 100);
map2.setSize(164, 100);
addObject(map1, 50, 30);
addObject(map2, 170, 30);
addObject(fertigst,110,90 );
map1.setSize(100, 50);
map2.setSize(100, 50);
fertigst.setSize(100, 50);
// for ( int i=0; i<=pnu; i++)
// {
@ -45,7 +45,7 @@ public class Map extends World implements ButtonEvent
// }
}
// Die Map Buttons geben der Variable m einen Wert
public void buttonClicked(Bildbutton b)
public void buttonClicked(Button b)
{
if (b== map1)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 659 B

Loading…
Cancel
Save