|
123456789101112131415161718192021222324252627282930 |
- import java.util.Scanner;
- public class ManualBot extends Bot{
- public static void main(String[] args) {
- Bot manualBot = new ManualBot(args);
- manualBot.run();
- }
-
- protected ManualBot(String[] args) {
- super(args);
- }
-
- protected char nextMove(View view) throws Exception{
- Scanner scanner = new Scanner(System.in);
- switch(scanner.nextLine().toLowerCase()){
- case "w":
- return '^' ;
- case "s":
- return 'v' ;
- case "a":
- return '<' ;
- case "d":
- return '>' ;
- case "q":
- throw new Exception();
- default:
- break;
- }
- return 0;
- }
- }
|