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,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--;