summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-11-29 00:39:28 +0100
committerPeter Wu <lekensteyn@gmail.com>2013-11-29 00:39:28 +0100
commit38564eb6736b820caff345b4adb2bfd8ec1c93c9 (patch)
treeaaa0cab6a37e9a08388d2052011b67e3c1a7b0e9
parentf8aff0fd8c258d8c716775ef2587e9b92070b3a1 (diff)
download2iv60-robots-38564eb6736b820caff345b4adb2bfd8ec1c93c9.tar.gz
Refactor: move Terrain outside RobotRace
-rw-r--r--src/RobotRace.java27
-rw-r--r--src/Terrain.java27
2 files changed, 27 insertions, 27 deletions
diff --git a/src/RobotRace.java b/src/RobotRace.java
index 8a197b7..6495285 100644
--- a/src/RobotRace.java
+++ b/src/RobotRace.java
@@ -388,33 +388,6 @@ public class RobotRace extends Base {
}
/**
- * Implementation of the terrain.
- */
- private class Terrain {
-
- /**
- * Can be used to set up a display list.
- */
- public Terrain() {
- // code goes here ...
- }
-
- /**
- * Draws the terrain.
- */
- public void draw() {
- // code goes here ...
- }
-
- /**
- * Computes the elevation of the terrain at ({@code x}, {@code y}).
- */
- public float heightAt(float x, float y) {
- return 0; // <- code goes here
- }
- }
-
- /**
* Main program execution body, delegates to an instance of
* the RobotRace implementation.
*/
diff --git a/src/Terrain.java b/src/Terrain.java
new file mode 100644
index 0000000..4b2c366
--- /dev/null
+++ b/src/Terrain.java
@@ -0,0 +1,27 @@
+
+/**
+ * Implementation of the terrain.
+ */
+class Terrain {
+
+ /**
+ * Can be used to set up a display list.
+ */
+ public Terrain() {
+ // code goes here ...
+ }
+
+ /**
+ * Draws the terrain.
+ */
+ public void draw() {
+ // code goes here ...
+ }
+
+ /**
+ * Computes the elevation of the terrain at ({@code x}, {@code y}).
+ */
+ public float heightAt(float x, float y) {
+ return 0; // <- code goes here
+ }
+}