123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package Praktikum05;
-
- import java.util.Random;
-
- public class EscapeBot extends Bot{
- protected EscapeBot(String args[]){
- super(args);
- }
-
-
- private Random schritte = new Random();
-
- private int s = 5;
-
- @Override
- protected char nextMove(View view) throws Exception {
- boolean exit = false;
- while(!exit){
- /*if(view.data.contains("o")){
-
- }*/
- if(s == 5){
- for(int i = 1; i == s; i++ ){
- return '^';
- }
- boolean turn = schritte.nextBoolean();
- if(turn == true){
- return '<';
- }else{
- return '>';
- }
- }
- }
-
- throw new Exception("Quit");
- }
-
- public static void main(String args[]){
- Bot ebot = new EscapeBot(args);
- ebot.run();
- }
- }
|