RumbleBot random turn

This commit is contained in:
Your Average Code 2024-01-25 19:16:42 +01:00
parent 6391e9d149
commit 13955b7b29

View File

@ -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);