Done with Game.java

This commit is contained in:
maxneedspats 2022-02-18 14:03:43 -06:00 committed by GitHub
parent c0a02db783
commit c7f92ba5ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ public class Game
boolean sameColor = false; boolean sameColor = false;
if (slices.get(0).getColor().equals(slices.get(1).getColor()) && (slices.get(0).getColor().equals(slices.get(2).getColor()))){ if (slices.get(0).getColor().equals(slices.get(1).getColor()) && (slices.get(0).getColor().equals(slices.get(2).getColor()))){
sameColor = true; sameColor = true;
System.out.println("Total prize money: $" + (2*slices.get(0).getPrizeAmount() + slices.get(1).getPrizeAmount() + slices.get(2).getPrizeAmount()) + "\n"); System.out.println("Total prize money: $" + 2*(slices.get(0).getPrizeAmount() + slices.get(1).getPrizeAmount() + slices.get(2).getPrizeAmount()) + "\n");
} else { } else {
System.out.println("Total prize money: $" + (slices.get(0).getPrizeAmount() + slices.get(1).getPrizeAmount() + slices.get(2).getPrizeAmount()) + "\n"); System.out.println("Total prize money: $" + (slices.get(0).getPrizeAmount() + slices.get(1).getPrizeAmount() + slices.get(2).getPrizeAmount()) + "\n");