From e2f3362ae1089641da7b99b6c7c06b98361073a2 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 21 Nov 2013 17:22:33 +0100 Subject: robot parameters --- src/RobotRace.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/RobotRace.java b/src/RobotRace.java index 4384b38..3e14212 100644 --- a/src/RobotRace.java +++ b/src/RobotRace.java @@ -329,14 +329,25 @@ public class RobotRace extends Base { /** The material from which this robot is built. */ private final Material material; + /** Relative lengths, widths and heights of robot model. */ + private final float torsoHeight, torsoWidth, shoulderRadius, armLength, + legLength, armWidth, legWidth, neckHeight, headRadius; + /** * Constructs the robot with initial parameters. */ - public Robot(Material material - /* add other parameters that characterize this robot */) { + public Robot(Material material) { + /* Set all parameters of the robot */ this.material = material; - - // code goes here ... + this.torsoHeight = 0.6f; + this.torsoWidth = 0.48f; + this.shoulderRadius = 0.09f; + this.armLength = 0.6f; + this.armWidth = 0.15f; + this.legLength = 0.78f; + this.legWidth = 0.3f; + this.neckHeight = 0.3f; + this.headRadius = 0.18f; } /** -- cgit v1.2.1