1234567891011121314151617181920212223242526272829303132333435 |
- package bot;
-
- import java.util.Scanner;
-
- public class ManualBot extends Bot {
- public ManualBot (String[] args){
- super(args);
- }
-
- public static void main (String[] args){
- ManualBot manualbot = new ManualBot(args);
- manualbot.run();
- }
-
- @Override
- protected char nextMove(View view) throws Exception {
- Scanner scanner = new Scanner(System.in);
- char move = scanner.nextLine().charAt(0);
-
- switch (move) {
- case 'w':
- case's':
- case'a':
- case'd':
- case'q':
- return move;
- default:
- System.out.println("Falsche Taste. Bitte geben sie w,s,a,d,q ein danke.");
- return nextMove(view);
- }
- }
- }
-
-
-
|