added getters and setters

This commit is contained in:
2018-02-26 17:44:09 +01:00
parent 3d2e56e093
commit 517168ef49

View File

@@ -50,6 +50,11 @@ public class Worm {
this.name = name; this.name = name;
} }
/**
*
* @param name
* @return
*/
private int isValidName (String name) { private int isValidName (String name) {
if (name.length() < 2 || !Character.isUpperCase(name.charAt(0))) { if (name.length() < 2 || !Character.isUpperCase(name.charAt(0))) {
@@ -66,4 +71,65 @@ public class Worm {
} }
return -1; 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;
}
} }