Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
- Changed joker chance values (Audience & Phone)
Browse files Browse the repository at this point in the history
- Added chance value to joker confirmation dialog
  • Loading branch information
Cr4zyFl1x committed Apr 12, 2021
1 parent 952fc5b commit 9761dfc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/eu/flrkv/wwm/GUI/GameWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -402,15 +402,15 @@ private void usePhoneJoker()
JOptionPane.showMessageDialog(this, "Dieser Joker wurde bereits eingesetzt!", "Wer wird Millionär | Fehler", JOptionPane.ERROR_MESSAGE);
return;
}
if (JOptionPane.showConfirmDialog(this, "Möchten Sie den Telefon-Joker einsetzen?", "Wer wird Millionär | Joker", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
if (JOptionPane.showConfirmDialog(this, "Möchten Sie den Telefon-Joker einsetzen? (65%-Chance)", "Wer wird Millionär | Joker", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
if (getRightAnswerID() == null) {
Utils.unknownErrorPopup();
return;
}
int rightAnswer = getRightAnswerID();
char propablyAnswer;
Random r = new Random();
if (r.nextInt(101) <= 60) {
if (r.nextInt(101) <= 65) {
System.out.println(rightAnswer);
propablyAnswer = Utils.buttonNoToChar(rightAnswer);
} else {
Expand Down Expand Up @@ -465,7 +465,7 @@ private void useAudienceJoker() {
JOptionPane.showMessageDialog(this, "Dieser Joker wurde bereits eingesetzt!", "Wer wird Millionär | Fehler", JOptionPane.ERROR_MESSAGE);
return;
}
if (JOptionPane.showConfirmDialog(this, "Möchten Sie den Publikums-Joker einsetzen?", "Wer wird Millionär | Joker", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
if (JOptionPane.showConfirmDialog(this, "Möchten Sie den Publikums-Joker einsetzen? (85%-Chance)", "Wer wird Millionär | Joker", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
if (getRightAnswerID() == null) {
Utils.unknownErrorPopup();
return;
Expand All @@ -481,7 +481,7 @@ private void useAudienceJoker() {
int sumUp = Utils.sumUpArrayVals(sortedArray);
double[] percentVals = new double[4];

if (new Random().nextInt(100) <= 69) {
if (new Random().nextInt(101) <= 85) {
percentVals[rightAnswer] = sortedArray[0];

for (int i=1; i < sortedArray.length; i++) {
Expand Down

0 comments on commit 9761dfc

Please sign in to comment.