From 7c8386d879d125f52b63a5f04fb07c467870c8b6 Mon Sep 17 00:00:00 2001 From: Your Average Code <138674451+UrAvgCode@users.noreply.github.com> Date: Thu, 25 Jan 2024 01:11:13 +0100 Subject: [PATCH] DummyBot --- src/DummyBot.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/DummyBot.java diff --git a/src/DummyBot.java b/src/DummyBot.java new file mode 100644 index 0000000..c231b8a --- /dev/null +++ b/src/DummyBot.java @@ -0,0 +1,23 @@ +import java.util.Random; + +public class DummyBot extends Bot { + protected final Random random = new Random(); + + public static void main(String[] args) { + Bot bot = new DummyBot(args); + bot.run(); + } + + protected DummyBot(String[] args) { + super(args); + } + + @Override + protected char nextMove(View view) { + return switch (random.nextInt(3)) { + case 1 -> '<'; + case 2 -> '>'; + default -> '^'; + }; + } +}