From 5239962efeaed496428b6517c12a425f048489f0 Mon Sep 17 00:00:00 2001 From: Friederike von Gruben Date: Mon, 6 Feb 2023 14:11:53 +0100 Subject: [PATCH] Added addPoints() to BlackJack This method adds points to the player or the bot --- src/main/java/org/bitbiome/classes/BlackJack.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/bitbiome/classes/BlackJack.java b/src/main/java/org/bitbiome/classes/BlackJack.java index b1bfce8..60c33ec 100644 --- a/src/main/java/org/bitbiome/classes/BlackJack.java +++ b/src/main/java/org/bitbiome/classes/BlackJack.java @@ -61,4 +61,9 @@ public class BlackJack { public Entity getEntity(int ID) { return Entity.getEventStatusById(ID); } + + public void addPoints(Entity entity, int points) { + if (entity == Entity.BOT) botPoints += points; + if (entity == Entity.PLAYER) playerPoints += points; + } }