summaryrefslogtreecommitdiff
path: root/src/Camera.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Camera.java')
-rw-r--r--src/Camera.java17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/Camera.java b/src/Camera.java
index c1b220b..8bc07a6 100644
--- a/src/Camera.java
+++ b/src/Camera.java
@@ -162,7 +162,7 @@ class Camera {
/**
* First person mode: look from the slowest robot forward.
*/
- FocusPosition focus = smoothFocusTo(getLastRobot());
+ FocusPosition focus = smoothFocusTo(getSlowestRobot());
// trivial: looks from the robot POV.
eye = track.getPointForLane(focus.getTimePos(), focus.getLane());
@@ -225,6 +225,7 @@ class Camera {
/**
* Returns the robots which has the lowest Global State Time position.
+ * (i.e. the last robot on the field).
*/
private Robot getSlowestRobot() {
Robot slowest = robots[0];
@@ -235,20 +236,6 @@ class Camera {
}
return slowest;
}
-
- /**
- * Returns the robot which is placed last in the race.
- */
- private Robot getLastRobot() {
- Robot last = robots[0];
-
- for (Robot robot : robots) {
- if (robot.getPositionMeters() < last.getPositionMeters()) {
- last = robot;
- }
- }
- return last;
- }
/**
* Time when the transition started;