Skip to content

Serializing and de-serializing BadukGame #1

@pranaygp

Description

@pranaygp

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions