remove money after bet

This commit is contained in:
Tyler Murphy 2022-10-04 12:41:34 -04:00
parent 642f801ae4
commit 77144b15e7
2 changed files with 3 additions and 3 deletions

View file

@ -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";

View file

@ -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);