<module type="JAVA_MODULE" version="4"> | <module type="JAVA_MODULE" version="4"> | ||||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | <component name="NewModuleRootManager" inherit-compiler-output="true"> | ||||
<exclude-output /> | <exclude-output /> | ||||
<content url="file://$MODULE_DIR$" /> | |||||
<content url="file://$MODULE_DIR$"> | |||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | |||||
</content> | |||||
<orderEntry type="inheritedJdk" /> | <orderEntry type="inheritedJdk" /> | ||||
<orderEntry type="sourceFolder" forTests="false" /> | <orderEntry type="sourceFolder" forTests="false" /> | ||||
</component> | </component> |
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
<project version="4"> | <project version="4"> | ||||
<component name="ProjectRootManager" version="2" project-jdk-name="17" project-jdk-type="JavaSDK"> | |||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_20" project-jdk-name="17" project-jdk-type="JavaSDK"> | |||||
<output url="file://$PROJECT_DIR$/out" /> | <output url="file://$PROJECT_DIR$/out" /> | ||||
</component> | </component> | ||||
</project> | </project> |
public class Main { | public class Main { | ||||
} | } |
import java.util.Scanner; | import java.util.Scanner; | ||||
public class ManualBot extends Bot{ | public class ManualBot extends Bot{ | ||||
public static void main(String[] args) { | public static void main(String[] args) { | ||||
Bot manualBot = new ManualBot(args); | Bot manualBot = new ManualBot(args); | ||||
manualBot.run(); | manualBot.run(); | ||||
} | } | ||||
switch(scanner.nextLine()){ | switch(scanner.nextLine()){ | ||||
case "w": | case "w": | ||||
return '^' ; | return '^' ; | ||||
break; | |||||
case "s": | case "s": | ||||
return 'V' ; | return 'V' ; | ||||
break; | |||||
case "a": | case "a": | ||||
return '<' ; | return '<' ; | ||||
break; | |||||
case "d": | case "d": | ||||
return '>' ; | return '>' ; | ||||
break; | |||||
case "q": | case "q": | ||||
throw new Exception; | |||||
break; | |||||
throw new Exception(); | |||||
default: | default: | ||||
break; | break; | ||||
} | } | ||||
return 0; | |||||
} | } |