Browse Source

DummyBot

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

+ 23
- 0
src/DummyBot.java View File

@@ -0,0 +1,23 @@
import java.util.Random;

public class DummyBot extends Bot {
protected final Random random = new Random();

public static void main(String[] args) {
Bot bot = new DummyBot(args);
bot.run();
}

protected DummyBot(String[] args) {
super(args);
}

@Override
protected char nextMove(View view) {
return switch (random.nextInt(3)) {
case 1 -> '<';
case 2 -> '>';
default -> '^';
};
}
}

Loading…
Cancel
Save