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

Download turn history for a game, or view it in the dev console. #639

Open
strinsberg opened this issue Sep 2, 2020 · 0 comments
Open

Comments

@strinsberg
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
There is no longer any logging for the games play history. The history of all plays is collected, but it is not available for devs to view or for players to send to us if they have problems.

Describe the solution you'd like
We discussed a way of downloading the history in a JSON file so that it could be sent to us by users that encounter a problem, if they want. Or a dev button that can be used to view the history.

The button would be easy to implement, though probably we don't want it to be seen by players, so it may take some thinking to hide it somewhere or force a developer to set a flag in the program to make it visible. All that has to be done for showing the history in the dev console is console.log(this.game.turnHistory) This will display an interactive JSON object that you can look through to inspect all the values in it.

The downloading it as a file is a bit trickier. I have found an npm lib that will make downloading data as a file easy. https://www.npmjs.com/package/js-file-download . However, as some objects store reference to the object that owns them (i.e. PlayField store the Player that it belongs to) it is not possible to stringify them, you get a circular reference error. So it may be necessary to do something like we did with the log, where the playInfo objects are converted to new objects that have no circular references before passing the data to the file download. This should not be too hard, especially if we are only concerned in who took the turn and what card they played. But if a little work could be done, we may be able to preserve a lot of information about each play, which may make it easier to track down bugs.

Once a file can be downloaded we would need an email address for users to send bugs, or a way to upload a file to the bug report system we already have (which may be there already).

Additional context
I am putting this in an issue because it is something we discussed, but I will not get around to implementing now that my summer has run out.

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