Debug Dice_Defender Dice_Offender

master
Zocker1999NET 8 years ago
parent 4e6235479d
commit 6e3411d753

@ -13,7 +13,7 @@ import java.util.Arrays; // (World, Actor, GreenfootImage, Greenfoot and Mouse
* @author (your name) * @author (your name)
* @version (a version number or a date) * @version (a version number or a date)
*/ */
public class Dice_Defender extends Dice public class Dice_Defender
{ {
/** /**
* Act - do whatever the Dice_Offender wants to do. This method is called whenever * Act - do whatever the Dice_Offender wants to do. This method is called whenever
@ -32,6 +32,7 @@ public class Dice_Defender extends Dice
*/ */
public int[] dice_defender(int troupNumberDefender) public int[] dice_defender(int troupNumberDefender)
{ {
diceEyesDefender = new int[2];
if(troupNumberDefender == 1) if(troupNumberDefender == 1)
{ {
diceEyesDefender[0] = (int) (Math.random() * 6 +1); diceEyesDefender[0] = (int) (Math.random() * 6 +1);

@ -13,7 +13,7 @@ import java.util.Arrays; // (World, Actor, GreenfootImage, Greenfoot and Mouse
* @author (your name) * @author (your name)
* @version (a version number or a date) * @version (a version number or a date)
*/ */
public class Dice_Offender extends Dice public class Dice_Offender
{ {
/** /**
* Act - do whatever the Dice_Offender wants to do. This method is called whenever * Act - do whatever the Dice_Offender wants to do. This method is called whenever
@ -32,6 +32,7 @@ public class Dice_Offender extends Dice
*/ */
public int[] dice_offender(int troupNumberOffender) public int[] dice_offender(int troupNumberOffender)
{ {
diceEyesOffender = new int[3];
if(troupNumberOffender == 1) if(troupNumberOffender == 1)
{ {
System.out.println("Mit einer verbleibenden Truppe auff dem Feld kann man nicht angreifen!"); System.out.println("Mit einer verbleibenden Truppe auff dem Feld kann man nicht angreifen!");

Loading…
Cancel
Save