123456789101112131415161718192021222324252627282930313233343536373839 |
- package Prak1;
-
- import java.util.Scanner;
-
- public class manuelBot extends Bot {
-
- public Scanner scanner;
-
- protected manuelBot(String[] args){
- super(args);
- this.scanner = new Scanner(System.in);
- }
-
- public char nextMove(Bot.View view){
- Scanner scanner = new Scanner(System.in);
- String input = scanner.nextLine();
- char command = input.charAt(0);
- switch (command) {
- case'w':
- return '^';
- case'a':
- return '>';
- case's':
- return 'v';
- case'd':
- return '>';
- case'q':
- System.exit(0);
- default: System.out.println("ungültig");
- throw new RuntimeException();
-
- }
- }
-
- public static void main(String[] args){
- manuelBot ManuelBot = new manuelBot(args);
- ManuelBot.run();
- }
- }
|