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



if (data.contains("*")) { if (data.contains("*")) {
int index = data.indexOf('*'); 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); return safeMove(data);
} else if (index % 5 < 2) { } else if (index % 5 < 2) {
return '<'; return '<';


protected char safeMove(String data) { protected char safeMove(String data) {
if ("~#X".contains("" + data.charAt(35))) { if ("~#X".contains("" + data.charAt(35))) {
currentStepCount = 2;
return '>'; return '>';
} else { } else {
return '^'; return '^';

Loading…
Cancel
Save