From 517168ef495bd430e2d79d7b88ec6566577edd8c Mon Sep 17 00:00:00 2001 From: Arthur Bols Date: Mon, 26 Feb 2018 17:44:09 +0100 Subject: [PATCH] added getters and setters --- src/Worm.java | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/Worm.java b/src/Worm.java index 228d04f..4b668c8 100644 --- a/src/Worm.java +++ b/src/Worm.java @@ -50,6 +50,11 @@ public class Worm { this.name = name; } + /** + * + * @param name + * @return + */ private int isValidName (String name) { if (name.length() < 2 || !Character.isUpperCase(name.charAt(0))) { @@ -66,4 +71,65 @@ public class Worm { } return -1; } + + + public double getCoordX() { + return this.coordX; + } + + public void setCoordX(double coordX) { + this.coordX = coordX; + } + + public double getCoordY() { + return this.coordY; + } + + public void setCoordY(double coordY) { + this.coordY = coordY; + } + + public double getOrientation() { + return this.orientation; + } + + public void setOrientation(double orientation) { + this.orientation = orientation; + } + + public double getRadius() { + return this.radius; + } + + public void setRadius(double radius) { + this.radius = radius; + } + + public double getMinRadius() { + return this.minRadius; + } + + public void setMinRadius(double minRadius) { + this.minRadius = minRadius; + } + + public double getMass() { + return this.mass; + } + + public void setMass(double mass) { + this.mass = mass; + } + + public double getPoints() { + return this.points; + } + + public void setPoints(double points) { + this.points = points; + } + + public String getName() { + return this.name; + } }