jGame-Pathfinder/bots/MyBot.java
2023-07-28 21:04:54 +02:00

39 lines
No EOL
682 B
Java

package bots;
import javaState.Bot;
import javaState.Controller;
import javaState.GameState;
public class MyBot extends Bot {
float dir = 0;
@Override
public String getStudentName() {
return "Max Mustermann";
}
@Override
public int getMatrikel() {
return 1337;
}
@Override
public String getName() {
return "example Bot";
}
@Override
public void init(GameState state) {
}
@Override
public Controller executeTurn(GameState state, Controller controller) {
dir+=0.01;
controller.dirX = Math.cos(dir);
controller.dirY = Math.sin(dir);
return controller;
}
}