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

Start and end a session when player enters and exits game screen #66

Closed
7 tasks
emaela opened this issue Nov 17, 2021 · 1 comment · Fixed by #108
Closed
7 tasks

Start and end a session when player enters and exits game screen #66

emaela opened this issue Nov 17, 2021 · 1 comment · Fixed by #108
Assignees

Comments

@emaela
Copy link
Collaborator

emaela commented Nov 17, 2021

Entering the game screen should trigger a new session to be created, and exiting the game screen should trigger the current session to end.

Specs:
In the Firebase interactor create a...

  • field that keeps track of the current user
  • field that keeps track of the current session
  • method that creates a new session with the user's id and a start timestamp, and adds the session to the user's list of sessions
  • method that ends the current session with an end timestamp

For the entering and exiting the game screen:

  • When a user enters the game screen, a new session should be created in the Firestore and it should become the current session
  • When a user exits the game screen, the current session should end (be given an end timestamp)
  • When a user exits the game screen, there should no longer be a current session

Backend brainstorm for reference on schemas.

@nicolesorial
Copy link
Contributor

nicolesorial commented Feb 3, 2022

Manually testing, ran into the following:

For all pairing: (tested with 2, 4, 8 pairs)

  • Sessions are tracked in their collection, but not added to the sessions under the user collection
  • Same thing for seen pairs

Other:
Users assigned to selecting are still getting pairing -- couldn't test selecting

EDIT: Fixed the game mode bug, and the same issues for pairing exist for selecting

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