add nextMove method
This commit is contained in:
1 parent
d61cff8eeb
commit
23d97635ad
4 files changed
+9
-8
No files matched your search
@@ -1,3 +1,4 @@
|
||||
|
||||
public class Main {
|
||||
|
||||
}
|
||||
+4
-6
@@ -1,6 +1,7 @@
|
||||
import java.util.Scanner;
|
||||
public class ManualBot extends Bot{
|
||||
public static void main(String[] args) {
|
||||
|
||||
Bot manualBot = new ManualBot(args);
|
||||
manualBot.run();
|
||||
}
|
||||
@@ -13,22 +14,19 @@ public class ManualBot extends Bot{
|
||||
switch(scanner.nextLine()){
|
||||
case "w":
|
||||
return '^' ;
|
||||
break;
|
||||
|
||||
case "s":
|
||||
return 'V' ;
|
||||
break;
|
||||
case "a":
|
||||
return '<' ;
|
||||
break;
|
||||
case "d":
|
||||
return '>' ;
|
||||
break;
|
||||
case "q":
|
||||
throw new Exception;
|
||||
break;
|
||||
throw new Exception();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user