Browse Source

Dateien hochladen nach „“

master
Orlando Boyny 11 months ago
parent
commit
4735175c47
1 changed files with 39 additions and 0 deletions
  1. 39
    0
      manuelBot.java

+ 39
- 0
manuelBot.java View File

@@ -0,0 +1,39 @@
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();
}
}

Loading…
Cancel
Save