-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The "Share Plan" button will generate a link to share the plan with other players, allowing players to send a link to their current plan to make coordination easier. When an end user clicks on a shared plan link, the app should deserialize the URL search params and set the application state to the shared state.
A user can click on a button to copy their plan to share with another user.
Potential URL Schema 1
?sig=<str:sig>&shipNames=<str[]:names>&shipCold=<int[]:coldMass>&shipHot=<int[]:hotMass>&shipColor=<str[]:shipColor>&isThreader=<bool[]:threader>
This has the benefit of being relatively easily editable by end users.
Potential URL Schema 2
?sig=<str:sig>&ships=<str:jsonEncodedShips>
This has the benefit of being relatively easy to implement, but you have to URL encode after serializing, and URL decode when deserializing the data.
Potential URL Schema 3
?sig=<str:sig>&ships=<str:b64EncodedShips>
This has the benefit of potentially being very compact, but has the downside of being hard to edit by end users and you have to write a custom save format.