Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both the origin and position of an instance of the Moving class is changing instead of the position only, and origin no Bug. #31

Open
wee-zard opened this issue Dec 2, 2023 · 0 comments

Comments

@wee-zard
Copy link

wee-zard commented Dec 2, 2023

Arrange:

  • Configuring the environment (with for example Gradle v3.3).
  • Importing the junit .jar files, so we can run junit test cases.
  • The com.badlogic.gdx.math.Vector2 Class is available and we can make Vector2 objects from it.

Act:

  • Making an instance of Moving Class with the following parameters:
    • origin = new Vector2(1, 2)
    • target = new Vector2(7, 5)
    • speed = 1.4f
  • Store this instance in a variable and call it as "moving1".
  • Call the start() method on the "moving1" variable.
  • Call the update() method on the "moving1" variable with number two as parameter.

Assert:

  • The position of the object is changing, but the origin will not.

Excepting:

  • The position of the object is changed, while the origin stay still after the call of the update() method.

Actually:

  • Both the origin and position of the "moving1" changed after the call of the method.

bug5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant