diff --git a/OGP1718-Worms/src/worms/model/Worm.java b/OGP1718-Worms/src/worms/model/Worm.java index 1de34a6..7feec97 100644 --- a/OGP1718-Worms/src/worms/model/Worm.java +++ b/OGP1718-Worms/src/worms/model/Worm.java @@ -556,18 +556,18 @@ public class Worm { * the old x-coordinate plus the number of steps multiplied with the distance * that the x-coordinate schould move (distance is equal to the radius multiplied * with the cosinus of the orientation) - * |distanceX = this.radius * Math.cos(this.orientation) - * |new.xCoordinate = this.location.item1 + numberSteps * distanceX + * |distanceX = this.radius * cos(getOrientation()) + * |new.xCoordinate = getLocation().item1 + numberSteps * distanceX * @post the y-coordinate of the new location of the worm schould be the location of * the old y-coordinate plus the number of steps multiplied with the distance * that the y-coordinate schould move (distance is equal to the radius multiplied * with the sinus of the orientation) - * |distanceY = this.radius * Math.sin(this.orientation) - * |new.yCoordinate = this.location.item2 + numberSteps * distanceY + * |distanceY = this.radius * sin(getOrientation()) + * |new.yCoordinate = getLocation().item2 + numberSteps * distanceY * @post the current value of action actionPoints has changed. The current value of action actionPoints * minus the cost of moving (abs(cos(theta)) + abs(4 sin(theta))) - * |value = (int) Math.ceil(Math.abs(Math.cos(this.orientation)) + Math.abs(4 * Math.sin(this.orientation))) - * |setActionPoints(this.actionPoints - value) + * |cost = (long) ceil(abs(cos(getOrientation())) + abs(4 * sin(getOrientation()))) * numberSteps + * |subtractActionPoints(cost) * @throws IllegalArgumentException * when the total of steps is lower then 0 or when the cost of action point is more * then the current value of action point