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

Support rectangular boards #105

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lightvector
Copy link

The SGF format is clearly documented to allow for any rectangular non-square board sizes:
https://www.red-bean.com/sgf/properties.html#SZ

However, wgo.js did not appear to support them. This pull request adds support for them, by splitting internally size into sizex and sizey, adjusting the computation of the default tx,ty,bx,by so that by default everything is drawn squarely unless the user changes it with section, and exposing the rectangular option in the API by allowing size to be an array of length 2, indicating the sizex and the sizey.

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

Successfully merging this pull request may close these issues.

1 participant