Browse Source

DummyBot more options

master
Your Average Code 11 months ago
parent
commit
0410084441
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      src/DummyBot.java

+ 11
- 1
src/DummyBot.java View File

@@ -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…
Cancel
Save