From 0752f25e1af3d8ae2395835896f95a73d1e047df Mon Sep 17 00:00:00 2001 From: Your Average Code <138674451+UrAvgCode@users.noreply.github.com> Date: Fri, 12 Jan 2024 14:15:04 +0100 Subject: [PATCH] RumbleBot working --- src/RumbleBot.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/RumbleBot.java b/src/RumbleBot.java index 6285471..434c51f 100644 --- a/src/RumbleBot.java +++ b/src/RumbleBot.java @@ -28,7 +28,9 @@ public class RumbleBot extends Bot { if (data.contains("*")) { int index = data.indexOf('*'); - if (index < view.width * height / 2 && !(index > view.width * height / 2 + 1)) { + if (index < width * height / 2 && index % width == 4) { + return 'f'; + } else if (index < width * height / 2 && !(index > width * height / 2 + 1)) { return safeMove(data); } else if (index % 5 < 2) { return '<'; @@ -52,6 +54,7 @@ public class RumbleBot extends Bot { protected char safeMove(String data) { if ("~#X".contains("" + data.charAt(35))) { + currentStepCount = 2; return '>'; } else { return '^';