FOP-2425-Marathon/H01/src/main/java/h01/BlueGhost.java
2025-03-16 16:45:18 +01:00

36 lines
905 B
Java

package h01;
import org.tudalgo.algoutils.student.annotation.StudentImplementationRequired;
import fopbot.Robot;
import h01.template.Families;
import h01.template.Ghost;
import h01.template.TickBased;
import java.util.stream.Stream;
/**
* The {@link BlueGhost} is a {@link Robot} that looks like a blue ghost.
* It tries to move in a circle.
*/
public class BlueGhost extends Robot implements Ghost, TickBased {
/**
* Creates a new {@link BlueGhost} at the given position.
*
* @param x the x-coordinate
* @param y the y-coordinate
*/
public BlueGhost(int x, int y) {
super(x, y, Families.GHOST_BLUE);
}
/**
* Turns the robot to the right and then moves in the first direction that is
* clear.
*/
@Override
@StudentImplementationRequired("H2.1")
public void doMove() {
FuckBot.exec("<<<(<!|)^", this);
}
}