8000 How can I encode a seed as JSON? · Issue #17 · elm/random · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
How can I encode a seed as JSON? #17
Open
@ChrisPenner

Description

@ChrisPenner

Hey there! Hope you're doing well! I'm building a browser game where many clients are synced up and I need to share seeds amongst clients;

I can get a Random.Seed into elm no problem by using Random.initialSeed; but once I have a seed I can't serialize it back into JSON; Is there any way to encode a Seed? I simply need either a Random.Seed -> Int or a Random.Seed -> Json.Encode.Value

Does this exist; or would it be possible to add? I'm a bit stuck on this one 😬

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0