RumbleBot random turn
This commit is contained in:
1 parent
6391e9d149
commit
13955b7b29
1 file changed
+4
-1
+4
-1
@@ -108,7 +108,10 @@ public class RumbleBot extends Bot {
|
||||
protected char walkAround(char[][] grid) {
|
||||
if (steps == 0) {
|
||||
steps = random.nextInt(20);
|
||||
return '>';
|
||||
if(random.nextBoolean())
|
||||
return '<';
|
||||
else
|
||||
return '>';
|
||||
} else {
|
||||
steps--;
|
||||
return safeMove(grid);
|
||||
|
||||
Reference in new issue
Block a user