From 89c4a837b4fde248d7b1a2ab8ace97889feb3e27 Mon Sep 17 00:00:00 2001 From: mokoe Date: Fri, 8 Jan 2021 12:51:29 +0100 Subject: [PATCH] =?UTF-8?q?St=C3=A4rkerer=20Zufall=20bei=20Farbauswahl=20d?= =?UTF-8?q?es=20Computers,=20wenn=20weniger=20Karten=20auf=20dessen=20Hand?= =?UTF-8?q?=20sind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/jaujau/spiellogik/Computer_gegner.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/de/jaujau/spiellogik/Computer_gegner.java b/src/de/jaujau/spiellogik/Computer_gegner.java index fdf62d3..4b05da1 100644 --- a/src/de/jaujau/spiellogik/Computer_gegner.java +++ b/src/de/jaujau/spiellogik/Computer_gegner.java @@ -190,6 +190,11 @@ public class Computer_gegner { wahl = farben[zufall(4)]; } } + if (hand.size() < 3) { + if(zufall(10) > 5) { + wahl = farben[zufall(4)]; + } + } } return wahl;