|
|
|
|
|
|
|
|
public void stop() |
|
|
public void stop() |
|
|
{ |
|
|
{ |
|
|
lg.info("Generator gestopt"); |
|
|
lg.info("Generator gestopt"); |
|
|
|
|
|
|
|
|
|
|
|
wuerfel_1.stop(); |
|
|
|
|
|
wuerfel_2.stop(); |
|
|
|
|
|
wuerfel_3.stop(); |
|
|
|
|
|
|
|
|
int w1_value = wuerfel_1.getValue(); |
|
|
int w1_value = wuerfel_1.getValue(); |
|
|
int w2_value = wuerfel_2.getValue(); |
|
|
int w2_value = wuerfel_2.getValue(); |
|
|
int w3_value = wuerfel_3.getValue(); |
|
|
int w3_value = wuerfel_3.getValue(); |
|
|
|
|
|
|
|
|
lg.info("Aktuelle Zahl in Wuerfel 1: "+ wuerfel_1.getValue()); |
|
|
|
|
|
lg.info("Aktuelle Zahl in Wuerfel 2: "+ wuerfel_2.getValue()); |
|
|
|
|
|
lg.info("Aktuelle Zahl in Wuerfel 3: "+ wuerfel_3.getValue()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (w1_value == w2_value && w2_value == w3_value){ |
|
|
if (w1_value == w2_value && w2_value == w3_value){ |
|
|
lg.warning("This user has to much luck, he/she should go to a casino"); |
|
|
lg.warning("This user has to much luck, he/she should go to a casino"); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
lg.warning("unlucky" + w1_value + w2_value + w3_value); |
|
|
|
|
|
|
|
|
lg.warning("unlucky -> " + w1_value + w2_value + w3_value); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wuerfel_1.stop(); |
|
|
|
|
|
wuerfel_2.stop(); |
|
|
|
|
|
wuerfel_3.stop(); |
|
|
|
|
|
|
|
|
|
|
|
lg.info("Zahl in Wuerfel 1 nach dem Stoppen: "+ wuerfel_1.getValue()); |
|
|
|
|
|
lg.info("Zahl in Wuerfel 2 nach dem Stoppen: "+ wuerfel_2.getValue()); |
|
|
|
|
|
lg.info("Zahl in Wuerfel 3 nach dem Stoppen: "+ wuerfel_3.getValue()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |