Merge branch 'Fehlerkorrekturen-Felix'

master
Zocker1999NET 8 years ago
commit ac24533edb

@ -18,6 +18,7 @@ public abstract class GeneralMap extends World implements ButtonEvent
Später evtl. weitere Werte wie Schwierigkeit denkbar Später evtl. weitere Werte wie Schwierigkeit denkbar
*/ */
Button modus = new Button("Kampf",25,this); Button modus = new Button("Kampf",25,this);
private final int X_OFFSET = 200; // Verschiebt die Provinzen nach rechts private final int X_OFFSET = 200; // Verschiebt die Provinzen nach rechts
private final int Y_OFFSET = 25; // Verschiebt die Provinzen nach unten private final int Y_OFFSET = 25; // Verschiebt die Provinzen nach unten
@ -66,6 +67,7 @@ public abstract class GeneralMap extends World implements ButtonEvent
addObject( modus, 1500, 808); addObject( modus, 1500, 808);
for (int i = 0; i < playerList.length; i++) { for (int i = 0; i < playerList.length; i++) {
players[i] = new Player(i,playerList[i],colorList[i]); players[i] = new Player(i,playerList[i],colorList[i]);
players[i].redrawPlayer();
} }
createPlayerObjects(playerList.length); createPlayerObjects(playerList.length);
@ -389,6 +391,7 @@ public abstract class GeneralMap extends World implements ButtonEvent
int errors = 0; int errors = 0;
for(int i = 1; i < provinces.length; i++) { for(int i = 1; i < provinces.length; i++) {
Province p = provinces[i]; Province p = provinces[i];
p.redrawProvince();
int oI = (i-1)*2; // ownerID inside dataL int oI = (i-1)*2; // ownerID inside dataL
int eI = oI+1; // entitiesCountID inside dataL int eI = oI+1; // entitiesCountID inside dataL
// Dieser Code überprüft die Datenliste mit den Daten, die die alte Methode (mit den vielen Zeilen) bereits hinterlegt haben sollte. Nur für Debugging! // Dieser Code überprüft die Datenliste mit den Daten, die die alte Methode (mit den vielen Zeilen) bereits hinterlegt haben sollte. Nur für Debugging!
@ -523,8 +526,6 @@ public abstract class GeneralMap extends World implements ButtonEvent
{ {
status=GameStates.KAMPF; status=GameStates.KAMPF;
modus.setText("Kampf beenden"); modus.setText("Kampf beenden");
} }
if ( modus == b && status== GameStates.KAMPF) if ( modus == b && status== GameStates.KAMPF)
{ {
@ -536,14 +537,13 @@ public abstract class GeneralMap extends World implements ButtonEvent
if( currentPlayer== players.length-1) if( currentPlayer== players.length-1)
{ {
currentPlayer=0; currentPlayer=0;
} }
else else
{ {
currentPlayer+=1; currentPlayer+=1;
} }
status=GameStates.SETZEN;
modus.setText("Kampf beginnen");
} }
} }

@ -10,11 +10,6 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class Map_World extends GeneralMap public class Map_World extends GeneralMap
{ {
/**
Anzahl der Provinzen.
*/
int provinceCount = 42;
/** /**
Konstruktor der Weltkarte; Konstruktor der Weltkarte;
@ -23,8 +18,7 @@ public class Map_World extends GeneralMap
public Map_World(String[] playerList, int[] colorList) public Map_World(String[] playerList, int[] colorList)
{ {
super(playerList,colorList);
super("",playerList,colorList);
setBackground("MapWorld.png"); setBackground("MapWorld.png");
/* /*
Hier werden später sämtliche Provinzen der Standard-Map erstellt. Hier werden später sämtliche Provinzen der Standard-Map erstellt.
@ -46,6 +40,7 @@ public class Map_World extends GeneralMap
// Festlegung der Provinz-Anzahl // Festlegung der Provinz-Anzahl
provinceCount = 42;
provinces = new Province[provinceCount + 1]; provinces = new Province[provinceCount + 1];
// Implementierung sämtlicher Provinzen // Implementierung sämtlicher Provinzen

@ -262,7 +262,7 @@ public class Player extends Actor
redraw(statistics,flag,textSize); redraw(statistics,flag,textSize);
break; break;
case 3: case 3:
flag = new GreenfootImage("images\\GrüneArmee.jpg"); flag = new GreenfootImage("images\\GrueneArmee.jpg");
redraw(statistics,flag,textSize); redraw(statistics,flag,textSize);
break; break;

@ -227,7 +227,7 @@ public class Province extends Actor
eCalculate(province,ownerString,textSize); eCalculate(province,ownerString,textSize);
break; break;
case 5: case 5:
ownerString = "grün"; ownerString = "gruen";
eCalculate(province,ownerString,textSize); eCalculate(province,ownerString,textSize);
break; break;
case 6: case 6:

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -1,9 +1,13 @@
#Greenfoot project file #Greenfoot project file
class.ArmyPlacer.superclass=Map_World
class.ArmySchubser.superclass=Map_World class.ArmySchubser.superclass=Map_World
class.Button.superclass=GUI_Interface class.Button.superclass=GUI_Interface
class.ButtonEvent.superclass= class.ButtonEvent.superclass=
class.Colours.superclass=greenfoot.World class.Colours.superclass=greenfoot.World
class.CurrentPlayerArrow.superclass=GUI_Interface class.CurrentPlayerArrow.superclass=GUI_Interface
class.Debug3.superclass=Map_World
class.Debug4.superclass=Map_World
class.Debug5.superclass=Map_World
class.DefenderDices.superclass=DicesList class.DefenderDices.superclass=DicesList
class.Dice.superclass=GUI_Interface class.Dice.superclass=GUI_Interface
class.Dice_Defender.superclass=Dice class.Dice_Defender.superclass=Dice
@ -13,7 +17,7 @@ class.Fight.superclass=Map_World
class.GUI_Interface.superclass=greenfoot.Actor class.GUI_Interface.superclass=greenfoot.Actor
class.GeneralMap.superclass=greenfoot.World class.GeneralMap.superclass=greenfoot.World
class.Label.superclass=GUI_Interface class.Label.superclass=GUI_Interface
class.Map.superclass= class.Map.superclass=greenfoot.World
class.Map_World.superclass=GeneralMap class.Map_World.superclass=GeneralMap
class.Menue_Button.superclass=Button class.Menue_Button.superclass=Button
class.OffenderDices.superclass=DicesList class.OffenderDices.superclass=DicesList
@ -28,69 +32,78 @@ class.Weltenauswahl.superclass=Spieloptionen
dependency1.from=Province dependency1.from=Province
dependency1.to=Utils dependency1.to=Utils
dependency1.type=UsesDependency dependency1.type=UsesDependency
dependency10.from=Province dependency10.from=GeneralMap
dependency10.to=GeneralMap dependency10.to=Player
dependency10.type=UsesDependency dependency10.type=UsesDependency
dependency11.from=GeneralMap dependency11.from=Button
dependency11.to=Player dependency11.to=ButtonEvent
dependency11.type=UsesDependency dependency11.type=UsesDependency
dependency12.from=Button dependency12.from=Button
dependency12.to=ButtonEvent dependency12.to=Utils
dependency12.type=UsesDependency dependency12.type=UsesDependency
dependency13.from=Button dependency13.from=ButtonEvent
dependency13.to=Utils dependency13.to=Button
dependency13.type=UsesDependency dependency13.type=UsesDependency
dependency14.from=ButtonEvent dependency14.from=Roll_Button
dependency14.to=Button dependency14.to=ButtonEvent
dependency14.type=UsesDependency dependency14.type=UsesDependency
dependency15.from=Roll_Button dependency15.from=Start_Load
dependency15.to=ButtonEvent dependency15.to=Button
dependency15.type=UsesDependency dependency15.type=UsesDependency
dependency16.from=Start_Load dependency16.from=Start_Load
dependency16.to=Button dependency16.to=ButtonEvent
dependency16.type=UsesDependency dependency16.type=UsesDependency
dependency17.from=Start_Load dependency17.from=Colours
dependency17.to=ButtonEvent dependency17.to=Button
dependency17.type=UsesDependency dependency17.type=UsesDependency
dependency18.from=Colours dependency18.from=Colours
dependency18.to=Button dependency18.to=Map
dependency18.type=UsesDependency dependency18.type=UsesDependency
dependency19.from=Colours dependency19.from=Map
dependency19.to=Map dependency19.to=Button
dependency19.type=UsesDependency dependency19.type=UsesDependency
dependency2.from=GeneralMap dependency2.from=GeneralMap
dependency2.to=Menue_Button dependency2.to=Menue_Button
dependency2.type=UsesDependency dependency2.type=UsesDependency
dependency20.from=Fight dependency20.from=Map
dependency20.to=Province dependency20.to=GeneralMap
dependency20.type=UsesDependency dependency20.type=UsesDependency
dependency21.from=Fight dependency21.from=Colours
dependency21.to=Dice_Offender dependency21.to=Map_World
dependency21.type=UsesDependency dependency21.type=UsesDependency
dependency22.from=Fight dependency22.from=Start_Load
dependency22.to=Dice_Defender dependency22.to=Colours
dependency22.type=UsesDependency dependency22.type=UsesDependency
dependency23.from=Map dependency23.from=ArmyPlacer
dependency23.to=Button dependency23.to=Province
dependency23.type=UsesDependency dependency23.type=UsesDependency
dependency24.from=Map dependency24.from=ArmyPlacer
dependency24.to=GeneralMap dependency24.to=Utils
dependency24.type=UsesDependency dependency24.type=UsesDependency
dependency25.from=Colours dependency25.from=GeneralMap
dependency25.to=Map_World dependency25.to=Button
dependency25.type=UsesDependency dependency25.type=UsesDependency
dependency26.from=Start_Load dependency26.from=GeneralMap
dependency26.to=Colours dependency26.to=Province
dependency26.type=UsesDependency dependency26.type=UsesDependency
dependency27.from=Map dependency27.from=GeneralMap
dependency27.to=GeneralMap dependency27.to=Dice_Offender
dependency27.type=UsesDependency dependency27.type=UsesDependency
dependency28.from=Colours dependency28.from=GeneralMap
dependency28.to=Map_World dependency28.to=Dice_Defender
dependency28.type=UsesDependency dependency28.type=UsesDependency
dependency29.from=GeneralMap
dependency29.to=Utils
dependency29.type=UsesDependency
dependency3.from=GeneralMap dependency3.from=GeneralMap
dependency3.to=Roll_Button dependency3.to=Roll_Button
dependency3.type=UsesDependency dependency3.type=UsesDependency
dependency30.from=Utils
dependency30.to=Province
dependency30.type=UsesDependency
dependency31.from=Map
dependency31.to=Map_World
dependency31.type=UsesDependency
dependency4.from=Map_World dependency4.from=Map_World
dependency4.to=Province dependency4.to=Province
dependency4.type=UsesDependency dependency4.type=UsesDependency
@ -100,29 +113,29 @@ dependency5.type=UsesDependency
dependency6.from=Menue_Button dependency6.from=Menue_Button
dependency6.to=ButtonEvent dependency6.to=ButtonEvent
dependency6.type=UsesDependency dependency6.type=UsesDependency
dependency7.from=ArmySchubser dependency7.from=DicesList
dependency7.to=Province dependency7.to=Dice
dependency7.type=UsesDependency dependency7.type=UsesDependency
dependency8.from=DicesList dependency8.from=DicesList
dependency8.to=Dice dependency8.to=Utils
dependency8.type=UsesDependency dependency8.type=UsesDependency
dependency9.from=DicesList dependency9.from=Province
dependency9.to=Utils dependency9.to=GeneralMap
dependency9.type=UsesDependency dependency9.type=UsesDependency
editor.fx.0.height=700 editor.fx.0.height=700
editor.fx.0.width=700 editor.fx.0.width=700
editor.fx.0.x=0 editor.fx.0.x=0
editor.fx.0.y=0 editor.fx.0.y=0
editor.swing.0.height=700 editor.swing.0.height=1056
editor.swing.0.width=701 editor.swing.0.width=1936
editor.swing.0.x=78 editor.swing.0.x=-8
editor.swing.0.y=0 editor.swing.0.y=-8
mainWindow.height=744 mainWindow.height=1056
mainWindow.width=1375 mainWindow.width=1936
mainWindow.x=-8 mainWindow.x=-8
mainWindow.y=0 mainWindow.y=-8
package.numDependencies=26 package.numDependencies=31
package.numTargets=22 package.numTargets=24
project.charset=UTF-8 project.charset=UTF-8
readme.height=58 readme.height=58
readme.name=@README readme.name=@README
@ -130,188 +143,196 @@ readme.width=47
readme.x=10 readme.x=10
readme.y=10 readme.y=10
target1.height=50 target1.height=50
target1.name=Player target1.name=GUI_Interface
target1.showInterface=false target1.showInterface=false
target1.type=ClassTarget target1.type=AbstractTarget
target1.typeParameters= target1.typeParameters=
target1.width=80 target1.width=100
target1.x=120 target1.x=10
target1.y=10 target1.y=250
target10.height=50 target10.height=50
target10.name=DefenderDices target10.name=Roll_Button
target10.showInterface=false target10.showInterface=false
target10.type=ClassTarget target10.type=ClassTarget
target10.typeParameters= target10.typeParameters=
target10.width=110 target10.width=90
target10.x=10 target10.x=190
target10.y=490 target10.y=190
target11.height=50 target11.height=50
target11.name=Province target11.name=ArmyPlacer
target11.showInterface=false target11.showInterface=false
target11.type=ClassTarget target11.type=ClassTarget
target11.typeParameters= target11.typeParameters=
target11.width=80 target11.width=90
target11.x=130 target11.x=10
target11.y=310 target11.y=670
target12.height=50 target12.height=50
target12.name=GeneralMap target12.name=Player
target12.showInterface=false target12.showInterface=false
target12.type=AbstractTarget target12.type=ClassTarget
target12.typeParameters= target12.typeParameters=
target12.width=90 target12.width=80
target12.x=70 target12.x=120
target12.y=70 target12.y=10
target13.height=50 target13.height=50
target13.name=Map_World target13.name=Debug5
target13.showInterface=false target13.showInterface=false
target13.type=ClassTarget target13.type=ClassTarget
target13.typeParameters= target13.typeParameters=
target13.width=90 target13.width=80
target13.x=170 target13.x=100
target13.y=70 target13.y=370
target14.height=50 target14.height=50
target14.name=Button target14.name=Debug4
target14.showInterface=false target14.showInterface=false
target14.type=ClassTarget target14.type=ClassTarget
target14.typeParameters= target14.typeParameters=
target14.width=80 target14.width=80
target14.x=10 target14.x=190
target14.y=130 target14.y=370
target15.height=50 target15.height=50
target15.name=ButtonEvent target15.name=Debug3
target15.showInterface=false target15.showInterface=false
target15.type=InterfaceTarget target15.type=ClassTarget
target15.typeParameters= target15.typeParameters=
target15.width=90 target15.width=80
target15.x=130 target15.x=110
target15.y=490 target15.y=550
target16.height=50 target16.height=50
target16.name=Dice_Offender target16.name=Dice
target16.showInterface=false target16.showInterface=false
target16.type=ClassTarget target16.type=ClassTarget
target16.typeParameters= target16.typeParameters=
target16.width=110 target16.width=80
target16.x=100 target16.x=100
target16.y=130 target16.y=190
target17.height=50 target17.height=50
target17.name=Utils target17.name=Menue_Button
target17.showInterface=false target17.showInterface=false
target17.type=ClassTarget target17.type=ClassTarget
target17.typeParameters= target17.typeParameters=
target17.width=80 target17.width=110
target17.x=10 target17.x=120
target17.y=190 target17.y=250
target18.height=50 target18.height=50
target18.name=Colours target18.name=DicesList
target18.showInterface=false target18.showInterface=false
target18.type=ClassTarget target18.type=AbstractTarget
target18.typeParameters= target18.typeParameters=
target18.width=80 target18.width=80
target18.x=10 target18.x=10
target18.y=610 target18.y=430
target19.height=50 target19.height=50
target19.name=Start_Load target19.name=OffenderDices
target19.showInterface=false target19.showInterface=false
target19.type=ClassTarget target19.type=ClassTarget
target19.typeParameters= target19.typeParameters=
target19.width=90 target19.width=110
target19.x=10 target19.x=100
target19.y=550 target19.y=430
target2.height=50 target2.height=50
target2.name=Dice target2.name=Label
target2.showInterface=false target2.showInterface=false
target2.type=ClassTarget target2.type=ClassTarget
target2.typeParameters= target2.typeParameters=
target2.width=80 target2.width=80
target2.x=100 target2.x=10
target2.y=190 target2.y=370
target20.height=50 target20.height=50
target20.name=Roll_Button target20.name=Province
target20.showInterface=false target20.showInterface=false
target20.type=ClassTarget target20.type=ClassTarget
target20.typeParameters= target20.typeParameters=
target20.width=90 target20.width=80
target20.x=190 target20.x=130
target20.y=190 target20.y=310
target21.height=50 target21.height=50
target21.name=Fight target21.name=GeneralMap
target21.showInterface=false target21.showInterface=false
target21.type=ClassTarget target21.type=AbstractTarget
target21.typeParameters= target21.typeParameters=
target21.width=80 target21.width=90
target21.x=100 target21.x=70
target21.y=610 target21.y=70
target22.height=50 target22.height=50
target22.name=Map target22.name=ButtonEvent
target22.showInterface=false target22.showInterface=false
target22.type=ClassTarget target22.type=InterfaceTarget
target22.typeParameters= target22.typeParameters=
target22.width=80 target22.width=90
target22.x=190 target22.x=130
target22.y=610 target22.y=490
target23.height=50 target23.height=50
target23.name=Map target23.name=Utils
target23.showInterface=false target23.showInterface=false
target23.type=ClassTarget target23.type=ClassTarget
target23.typeParameters= target23.typeParameters=
target23.width=80 target23.width=80
target23.x=190 target23.x=10
target23.y=610 target23.y=190
target24.height=50
target24.name=Map
target24.showInterface=false
target24.type=ClassTarget
target24.typeParameters=
target24.width=80
target24.x=190
target24.y=610
target3.height=50 target3.height=50
target3.name=GUI_Interface target3.name=Dice_Defender
target3.showInterface=false target3.showInterface=false
target3.type=AbstractTarget target3.type=ClassTarget
target3.typeParameters= target3.typeParameters=
target3.width=100 target3.width=110
target3.x=10 target3.x=10
target3.y=250 target3.y=310
target4.height=50 target4.height=50
target4.name=Menue_Button target4.name=DefenderDices
target4.showInterface=false target4.showInterface=false
target4.type=ClassTarget target4.type=ClassTarget
target4.typeParameters= target4.typeParameters=
target4.width=110 target4.width=110
target4.x=120 target4.x=10
target4.y=250 target4.y=490
target5.height=50 target5.height=50
target5.name=Label target5.name=Map_World
target5.showInterface=false target5.showInterface=false
target5.type=ClassTarget target5.type=ClassTarget
target5.typeParameters= target5.typeParameters=
target5.width=80 target5.width=90
target5.x=10 target5.x=170
target5.y=370 target5.y=70
target6.height=50 target6.height=50
target6.name=ArmySchubser target6.name=Button
target6.showInterface=false target6.showInterface=false
target6.type=ClassTarget target6.type=ClassTarget
target6.typeParameters= target6.typeParameters=
target6.width=110 target6.width=80
target6.x=100 target6.x=10
target6.y=370 target6.y=130
target7.height=50 target7.height=50
target7.name=DicesList target7.name=Dice_Offender
target7.showInterface=false target7.showInterface=false
target7.type=AbstractTarget target7.type=ClassTarget
target7.typeParameters= target7.typeParameters=
target7.width=80 target7.width=110
target7.x=10 target7.x=100
target7.y=430 target7.y=130
target8.height=50 target8.height=50
target8.name=OffenderDices target8.name=Colours
target8.showInterface=false target8.showInterface=false
target8.type=ClassTarget target8.type=ClassTarget
target8.typeParameters= target8.typeParameters=
target8.width=110 target8.width=80
target8.x=100 target8.x=10
target8.y=430 target8.y=610
target9.height=50 target9.height=50
target9.name=Dice_Defender target9.name=Start_Load
target9.showInterface=false target9.showInterface=false
target9.type=ClassTarget target9.type=ClassTarget
target9.typeParameters= target9.typeParameters=
target9.width=110 target9.width=90
target9.x=10 target9.x=10
target9.y=310 target9.y=550
version=2.8.0 version=2.8.0
world.lastInstantiated=Map_World world.lastInstantiated=Map_World

Loading…
Cancel
Save