From 10c67f8bcb9404852955a15fedb1e55a875983e5 Mon Sep 17 00:00:00 2001 From: Steffen Helmke Date: Fri, 14 Jan 2022 18:54:49 +0100 Subject: [PATCH] 4gewinnt: updated playChip --- src/main/java/de/tims/viergewinnt/ai/Logic.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/tims/viergewinnt/ai/Logic.java b/src/main/java/de/tims/viergewinnt/ai/Logic.java index d4a20aa..c42c5cc 100644 --- a/src/main/java/de/tims/viergewinnt/ai/Logic.java +++ b/src/main/java/de/tims/viergewinnt/ai/Logic.java @@ -21,7 +21,9 @@ public class Logic { //add board update updateGui(playfield); - testForWin(playfield, player); + if(testForWin(playfield, player)) { + calcScore(playfield); + } currentPlayer = (player % 2) + 1; return 0; }