RumbleBot working

This commit is contained in:
Your Average Code 2024-01-12 14:15:04 +01:00
parent 6bbe7e029b
commit 0752f25e1a

View File

@ -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 '^';