|
1234567891011121314151617181920212223242526272829 |
- import java.util.Scanner;
-
- public class ManualBot extends Bot {
-
- public static void main(String[] args) {
- Bot bot = new ManualBot(args);
- bot.run();
- }
-
- protected ManualBot(String[] args) {
- super(args);
- }
-
- @Override
- protected char nextMove(View view) throws Exception {
- Scanner scanner = new Scanner(System.in);
- String input = scanner.nextLine();
- if(input.equals("q"))
- throw new RuntimeException("Quit");
-
- return switch (input) {
- case "w" -> '^';
- case "a" -> '<';
- case "s" -> 'V';
- case "d" -> '>';
- default -> 'E';
- };
- }
- }
|