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

Correct me ! #13

Open
alshaary opened this issue Sep 2, 2023 · 1 comment
Open

Correct me ! #13

alshaary opened this issue Sep 2, 2023 · 1 comment

Comments

@alshaary
Copy link

alshaary commented Sep 2, 2023

@alshaary alshaary changed the title Why you subtract from north, you must add one to y axis ? Correct me ! Sep 2, 2023
@vipulsurw
Copy link

  1. Subtracting 1 from room.y moves the player one unit north because it checks for a valid tile at room.x (x-axis stays the same) and room.y - 1 (one unit less on the y-axis, which represents going north).

  2. Adding 1 to room.y moves the player one unit south because it checks for a valid tile at the same room.x and room.y + 1 (one unit more on the y-axis, which represents going south).

Hope that helps!

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