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

[Refactoring]: Token.getFacing() should return a different default value based on grid #5254

Open
cwisniew opened this issue Feb 14, 2025 · 0 comments
Assignees
Labels
code-maintenance Adding/editing javadocs, unit tests, formatting.

Comments

@cwisniew
Copy link
Member

Describe the problem

Token.getFacing() should return a different default value based on grid

/**
* Facing is in the map space where 0 degrees is along the X axis to the right and proceeding CCW
* for positive angles.
*
* <p>Round/Square tokens that have no facing set, return null. Top Down tokens default to -90.
*
* @return null or angle in degrees
*/
public int getFacing() {
// -90° is natural alignment. TODO This should really be a per grid setting
return facing == null ? -90 : facing;
}

The improvement you'd like to see

Token.getFacing() should return a different default value based on grid

Expected Benefits

More reasonable defaults

Additional Context

No response

@cwisniew cwisniew added the code-maintenance Adding/editing javadocs, unit tests, formatting. label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-maintenance Adding/editing javadocs, unit tests, formatting.
Projects
None yet
Development

No branches or pull requests

2 participants