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

Save move history #2

Open
supermitch opened this issue Jan 9, 2016 · 1 comment
Open

Save move history #2

supermitch opened this issue Jan 9, 2016 · 1 comment
Assignees

Comments

@supermitch
Copy link
Owner

The game should save a copy of the move history as a series of (username, move) tuples. That's all we would need in order to replay the game.

Saving (username, move, state) tuples would mean the entire game could be viewed without having the engine replay the game. That might better.

I think this should be a field in NDB outside of game and state ... a list of json objects where each object is a {'user': mitch, 'move': 'go north', 'state': }. Obviously then we'll need to store the starting state as well.

@supermitch
Copy link
Owner Author

Probably mostly finished here: 907367f

But untested. I think original state (no moves) is missing also. Need to add API route to download a game too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants