DummyBot more options
This commit is contained in:
parent
475e5c1c5d
commit
0410084441
@ -14,9 +14,19 @@ public class DummyBot extends Bot {
|
||||
|
||||
@Override
|
||||
protected char nextMove(View view) {
|
||||
return switch (random.nextInt(3)) {
|
||||
String data = view.data
|
||||
.replace('^', '*')
|
||||
.replace('<', '*')
|
||||
.replace('>', '*')
|
||||
.replace('v', '*');
|
||||
|
||||
if (data.contains("*") && random.nextFloat() < 0.8)
|
||||
return 'f';
|
||||
|
||||
return switch (random.nextInt(10)) {
|
||||
case 1 -> '<';
|
||||
case 2 -> '>';
|
||||
case 3 -> 'v';
|
||||
default -> '^';
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user