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

Optimization for moving #5

Open
giovanichaves opened this issue Aug 7, 2018 · 1 comment
Open

Optimization for moving #5

giovanichaves opened this issue Aug 7, 2018 · 1 comment

Comments

@giovanichaves
Copy link

Why not just using currentCoordinates = positionAfterMove instead of calculating it again?

currentCoordinates = currentCoordinates.newCoordinatesFor(currentDirection.stepSizeForXAxis(), currentDirection.stepSizeForYAxis());

@priyaaank
Copy link
Owner

Thanks. You might be right, I am going to check if newCoordinatesForStepSize and newCoordinatesFor methods are redundant. Cause I have long lost the context of the problem, and now they look redundant.

I'll try to substitute and run the tests and see if it continues to behave as expected.

Cheers

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

2 participants