RumbleBot random turn
This commit is contained in:
parent
6391e9d149
commit
13955b7b29
@ -108,6 +108,9 @@ public class RumbleBot extends Bot {
|
|||||||
protected char walkAround(char[][] grid) {
|
protected char walkAround(char[][] grid) {
|
||||||
if (steps == 0) {
|
if (steps == 0) {
|
||||||
steps = random.nextInt(20);
|
steps = random.nextInt(20);
|
||||||
|
if(random.nextBoolean())
|
||||||
|
return '<';
|
||||||
|
else
|
||||||
return '>';
|
return '>';
|
||||||
} else {
|
} else {
|
||||||
steps--;
|
steps--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user