public void Init(KarelRobot robot, Matrix4x4 gridMatrix) { _robot = robot; _gridMatrix = gridMatrix; UpdatePosition(); UpdateRotation(); robot.PositionChanged += (sender) => UpdatePosition(); robot.DirectionChanged += (sender) => UpdateRotation(); }
public KarelInstance(WorldFile file) { Robot = new KarelRobot(this, file); World = new KarelWorld(file); }
public bool IsBlocked(KarelRobot robot) => IsBlocked(robot.Position, robot.Direction);