remove money after bet
This commit is contained in:
parent
642f801ae4
commit
77144b15e7
2 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ public class Roulette {
|
|||
default -> false;
|
||||
};
|
||||
int rate = getWinRate(guess);
|
||||
int balance = win ? money -bet + bet * rate : money - bet;
|
||||
int balance = win ? money - bet + bet * rate : money - bet;
|
||||
EmbedBuilder builder = Ken.getInstance().getDefaultEmbed()
|
||||
.setAuthor("Roulette")
|
||||
.appendDescription("`Balance:` "+money+"\n")
|
||||
|
@ -59,7 +59,7 @@ public class Roulette {
|
|||
}
|
||||
|
||||
private String getColor(int rand){
|
||||
boolean even = (rand&2)==1;
|
||||
boolean even = (rand%2)==1;
|
||||
if(rand<3) return "green";
|
||||
if(rand<=10)
|
||||
if(even) return "black";
|
||||
|
|
|
@ -47,6 +47,7 @@ public class Slots {
|
|||
.appendDescription("`Balance:` "+money+"\n")
|
||||
.appendDescription("`Bet:` "+bet+"\n")
|
||||
.appendDescription(slot1.emoji + slot2.emoji + slot3.emoji + "\n");
|
||||
money -= bet;
|
||||
if(slot1.emoji.equals(slot2.emoji) && slot1.emoji.equals(slot3.emoji)){
|
||||
// 3 of a kind
|
||||
money += bet * slot2.full_reward;
|
||||
|
@ -58,7 +59,6 @@ public class Slots {
|
|||
builder.setFooter("2 of a kind! ("+slot.half_reward+"x)");
|
||||
} else {
|
||||
// Fail
|
||||
money -= bet;
|
||||
builder.setFooter("None of a kind, loose bet.");
|
||||
}
|
||||
builder.appendDescription("`New Balance:` "+money);
|
||||
|
|
Loading…
Reference in a new issue