RumbleBot working
This commit is contained in:
parent
6bbe7e029b
commit
0752f25e1a
@ -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…
x
Reference in New Issue
Block a user