added getters and setters
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user