// @TODO: Figure out how to recover Grand Prize info, perhaps
// store in the database or something.
int correct = drawing.checkCorrect(bet.getBet());
+ String formatted_message = "The result of VIzon No.%d was: %d %d %d %d %d %d, ";
switch (correct)
{
case 6:
- Acidictive.reply(source, to, c, String.format(
- "The result of VIzon No.%d was: %d %d %d %d %d %d, you won first prize for this drawing! Your bet was: %d %d %d %d %d %d",
- drawing.getId(),
- bets.get(0),
- bets.get(1),
- bets.get(2),
- bets.get(3),
- bets.get(4),
- bets.get(5),
- bet.getBet().getFirst(),
- bet.getBet().getSecond(),
- bet.getBet().getThird(),
- bet.getBet().getFourth(),
- bet.getBet().getFifth(),
- bet.getBet().getSixth()));
+ formatted_message += "you won first prize for this drawing! Your bet was: %d %d %d %d %d %d";
break;
case 5:
- Acidictive.reply(source, to, c, String.format(
- "The result of VIzon No.%d was: %d %d %d %d %d %d, you won second prize for this drawing! Your bet was: %d %d %d %d %d %d",
- drawing.getId(),
- bets.get(0),
- bets.get(1),
- bets.get(2),
- bets.get(3),
- bets.get(4),
- bets.get(5),
- bet.getBet().getFirst(),
- bet.getBet().getSecond(),
- bet.getBet().getThird(),
- bet.getBet().getFourth(),
- bet.getBet().getFifth(),
- bet.getBet().getSixth()));
+ formatted_message += "you won second prize for this drawing! Your bet was: %d %d %d %d %d %d";
break;
case 4:
- Acidictive.reply(source, to, c, String.format(
- "The result of VIzon No.%d was: %d %d %d %d %d %d, you won third prize for this drawing! Your bet was: %d %d %d %d %d %d",
- drawing.getId(),
- bets.get(0),
- bets.get(1),
- bets.get(2),
- bets.get(3),
- bets.get(4),
- bets.get(5),
- bet.getBet().getFirst(),
- bet.getBet().getSecond(),
- bet.getBet().getThird(),
- bet.getBet().getFourth(),
- bet.getBet().getFifth(),
- bet.getBet().getSixth()));
+ formatted_message += "you won third prize for this drawing! Your bet was: %d %d %d %d %d %d";
break;
case 3:
- Acidictive.reply(source, to, c, String.format(
- "The result of VIzon No.%d was: %d %d %d %d %d %d, you won the consolation prize for this drawing! Your bet was: %d %d %d %d %d %d",
- drawing.getId(),
- bets.get(0),
- bets.get(1),
- bets.get(2),
- bets.get(3),
- bets.get(4),
- bets.get(5),
- bet.getBet().getFirst(),
- bet.getBet().getSecond(),
- bet.getBet().getThird(),
- bet.getBet().getFourth(),
- bet.getBet().getFifth(),
- bet.getBet().getSixth()));
+ formatted_message += "you won the consolation prize for this drawing! Your bet was: %d %d %d %d %d %d";
break;
default:
- Acidictive.reply(source, to, c, String.format(
- "The result of VIzon No.%d was: %d %d %d %d %d %d, you did not win any prize for this drawing. Your bet was: %d %d %d %d %d %d",
+ formatted_message += "you did not win any prize for this drawing. Your bet was: %d %d %d %d %d %d";
+ break;
+ }
+
+ Acidictive.reply(source, to, c, String.format(formatted_message,
drawing.getId(),
bets.get(0),
bets.get(1),
bet.getBet().getFourth(),
bet.getBet().getFifth(),
bet.getBet().getSixth()));
- break;
- }
}
}
}