jGame-Pathfinder/bots/MyBot.java

39 lines
682 B
Java
Raw Permalink Normal View History

2023-07-28 21:04:54 +02:00
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;
}
}