You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Having a
BadukGame
object is nice since you can store state, however, I can't think of a good way to serialize aBadukGame
into, say, JSON, and then parse it back into aBadukGame
object.There's already a function called
koString
that serializes the state into a string. Can we perhaps have a constructor that takes akoString
, and constructs the game from that string? alternatively, we can create a new instance methodtoJSON
that serializes a game to JSON, and a static method calledfromJSON
that creates aBadukGame
from JSON.Thoughts?
The text was updated successfully, but these errors were encountered: