From 308331a45f947f92888c635266733449676d1714 Mon Sep 17 00:00:00 2001 From: blzimme000 Date: Fri, 18 Feb 2022 13:56:37 -0600 Subject: [PATCH] Fixed Game.java sameColor multiplier, tested in Java 8 --- src/com/company/Game.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/company/Game.java b/src/com/company/Game.java index cdd8df3..1e96ceb 100644 --- a/src/com/company/Game.java +++ b/src/com/company/Game.java @@ -13,7 +13,7 @@ public class Game boolean sameColor = false; if (slices.get(0).getColor().equals(slices.get(1).getColor()) && (slices.get(0).getColor().equals(slices.get(2).getColor()))){ 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 { System.out.println("Total prize money: $" + (slices.get(0).getPrizeAmount() + slices.get(1).getPrizeAmount() + slices.get(2).getPrizeAmount()) + "\n"); @@ -22,7 +22,7 @@ public class Game System.out.println(e); } if (sameColor){ - System.out.println("Three " + slices.get(0).getColor() + "s = double your money"); + System.out.println("Three " + slices.get(0).getColor() + "s = double your money!"); } } }