Browse Source

RumbleBot working

master
Your Average Code 11 months ago
parent
commit
0752f25e1a
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      src/RumbleBot.java

+ 4
- 1
src/RumbleBot.java 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 '^';

Loading…
Cancel
Save