From 09e3cdce30185b88c731d60e887b25fd8ce19936 Mon Sep 17 00:00:00 2001 From: Friederike von Gruben Date: Mon, 6 Feb 2023 14:10:40 +0100 Subject: [PATCH] Added isIn() to BlackJack This method returns whether the bot or the player is in the game --- src/main/java/org/bitbiome/classes/BlackJack.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/bitbiome/classes/BlackJack.java b/src/main/java/org/bitbiome/classes/BlackJack.java index b4ed1f9..dfb791c 100644 --- a/src/main/java/org/bitbiome/classes/BlackJack.java +++ b/src/main/java/org/bitbiome/classes/BlackJack.java @@ -53,4 +53,8 @@ public class BlackJack { public int getPoints(Entity entity) { return entity == Entity.PLAYER ? playerPoints : botPoints; } + + public boolean isIn(Entity entity) { + return entity == Entity.PLAYER ? playerIn : botIn; + } }