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

Serializing and de-serializing BadukGame #1

Open
pranaygp opened this issue Dec 9, 2017 · 0 comments
Open

Serializing and de-serializing BadukGame #1

pranaygp opened this issue Dec 9, 2017 · 0 comments

Comments

@pranaygp
Copy link

pranaygp commented Dec 9, 2017

Having a BadukGame object is nice since you can store state, however, I can't think of a good way to serialize a BadukGame into, say, JSON, and then parse it back into a BadukGame object.

There's already a function called koString that serializes the state into a string. Can we perhaps have a constructor that takes a koString, and constructs the game from that string? alternatively, we can create a new instance method toJSON that serializes a game to JSON, and a static method called fromJSON that creates a BadukGame from JSON.

Thoughts?

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

1 participant