schrijffouten verbeteren

This commit is contained in:
Leen Dereu
2018-03-23 12:46:27 +01:00
parent 73b72c4902
commit 06ac444ba2

View File

@@ -552,15 +552,15 @@ public class Worm {
* @param numberSteps * @param numberSteps
* the number of steps the worm should take * the number of steps the worm should take
* *
* @post the x-coordinate of the new location of the worm schould be the location of * @post the x-coordinate of the new location of the worm should be the location of
* the old x-coordinate plus the number of steps multiplied with the distance * 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 * that the x-coordinate should move (distance is equal to the radius multiplied
* with the cosinus of the orientation) * with the cosinus of the orientation)
* |distanceX = this.radius * cos(getOrientation()) * |distanceX = this.radius * cos(getOrientation())
* |new.xCoordinate = getLocation().item1 + numberSteps * distanceX * |new.xCoordinate = getLocation().item1 + numberSteps * distanceX
* @post the y-coordinate of the new location of the worm schould be the location of * @post the y-coordinate of the new location of the worm should be the location of
* the old y-coordinate plus the number of steps multiplied with the distance * 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 * that the y-coordinate should move (distance is equal to the radius multiplied
* with the sinus of the orientation) * with the sinus of the orientation)
* |distanceY = this.radius * sin(getOrientation()) * |distanceY = this.radius * sin(getOrientation())
* |new.yCoordinate = getLocation().item2 + numberSteps * distanceY * |new.yCoordinate = getLocation().item2 + numberSteps * distanceY
@@ -658,7 +658,7 @@ public class Worm {
* @post the worm jumps to his new place. The new place is the x-coordinate plus the jump distance * @post the worm jumps to his new place. The new place is the x-coordinate plus the jump distance
* with the jump velocity * with the jump velocity
* |setLocation(Tuple.create(getLocation().item1 + jumpDistance(this.jumpVelocity()), getLocation().item2)) * |setLocation(Tuple.create(getLocation().item1 + jumpDistance(this.jumpVelocity()), getLocation().item2))
* @post the current action actionPoints schould be 0 after a jump * @post the current action actionPoints should be 0 after a jump
* |setActionPoints(0) * |setActionPoints(0)
* @throws IllegalStateException * @throws IllegalStateException
* if the current action actionPoints is equal to 0 or the orientation is more then * if the current action actionPoints is equal to 0 or the orientation is more then
@@ -695,7 +695,7 @@ public class Worm {
/** /**
* *
* @param deltaTime * @param deltaTime
* the total time the worm schould jump * the total time the worm should jump
* @return Tuple<Double, Double> with the new location of the worm. The new x-coordinate is the old x-coordinate plus the jump velocity * @return Tuple<Double, Double> with the new location of the worm. The new x-coordinate is the old x-coordinate plus the jump velocity
* multiplied with the cosinus of the orientation multiplied with delta time. The new y-coordinate is the old y-coordinate plus * multiplied with the cosinus of the orientation multiplied with delta time. The new y-coordinate is the old y-coordinate plus
* the jump velocity multiplied with the sinus of the orientation multiplied with delta time minus 0,5 times the gravity multiplied * the jump velocity multiplied with the sinus of the orientation multiplied with delta time minus 0,5 times the gravity multiplied