SnakeBot/SnakeBot.java

50 lines
771 B
Java
Raw Normal View History

2025-02-09 18:37:34 +01:00
import java.util.Scanner;
public class SnakeBot extends Bot {
// int rounds = ;
int steps = 1;
public SnakeBot(String [] args) {
super(args);
}
@Override
public char nextMove(View view) throws Exception {
rounds++;
switch(rounds){
case 3:
rounds = 0;
move(steps);
steps++;
return '<';
default:
move(steps);
steps++;
}
return 0;
}
public char move(int s){
for(int i = 0; i < s; i++){
return '^';
}
return 0;
}
public static void main(String[] args) {
SnakeBot bot = new SnakeBot(args);
bot.run();
}
}