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

Export to binary/base64 format #2

Open
danprince opened this issue Jul 10, 2016 · 0 comments
Open

Export to binary/base64 format #2

danprince opened this issue Jul 10, 2016 · 0 comments

Comments

@danprince
Copy link
Owner

Finish encoder, so that grid can be encoded in URL param.

Impl. notes:

  • Flatten grid
  • Partition into groups of 4 tiles
  • Shift encode each 4 into a Uint8
  • String.fromCharCode to get corresponding char
  • join and btoa to get URL ready string
  • Store grid width as separate URL parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant