schrijffouten verbeteren
This commit is contained in:
@@ -552,15 +552,15 @@ public class Worm {
|
||||
* @param numberSteps
|
||||
* 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
|
||||
* 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)
|
||||
* |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
|
||||
* @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
|
||||
* 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)
|
||||
* |distanceY = this.radius * sin(getOrientation())
|
||||
* |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
|
||||
* with the jump velocity
|
||||
* |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)
|
||||
* @throws IllegalStateException
|
||||
* if the current action actionPoints is equal to 0 or the orientation is more then
|
||||
@@ -695,7 +695,7 @@ public class Worm {
|
||||
/**
|
||||
*
|
||||
* @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
|
||||
* 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
|
||||
|
Reference in New Issue
Block a user