From 04100844417d7686c57480886c4ab5e51154947d Mon Sep 17 00:00:00 2001 From: Your Average Code <138674451+UrAvgCode@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:18:12 +0100 Subject: [PATCH] DummyBot more options --- src/DummyBot.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/DummyBot.java b/src/DummyBot.java index c231b8a..21f26f5 100644 --- a/src/DummyBot.java +++ b/src/DummyBot.java @@ -14,9 +14,19 @@ public class DummyBot extends Bot { @Override protected char nextMove(View view) { - return switch (random.nextInt(3)) { + String data = view.data + .replace('^', '*') + .replace('<', '*') + .replace('>', '*') + .replace('v', '*'); + + if (data.contains("*") && random.nextFloat() < 0.8) + return 'f'; + + return switch (random.nextInt(10)) { case 1 -> '<'; case 2 -> '>'; + case 3 -> 'v'; default -> '^'; }; }