diff --git a/manuelBot.java b/manuelBot.java new file mode 100644 index 0000000..830a9e5 --- /dev/null +++ b/manuelBot.java @@ -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(); + } +}