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

refactor players into a map #130

Open
5 tasks done
nstringham opened this issue Nov 10, 2022 · 0 comments · May be fixed by #176
Open
5 tasks done

refactor players into a map #130

nstringham opened this issue Nov 10, 2022 · 0 comments · May be fixed by #176
Assignees

Comments

@nstringham
Copy link
Member

nstringham commented Nov 10, 2022

the players array is hard to use because indexof is O(n) we should replace it with a map from uid to player because this is faster more readable and works in firestore function

Task List:

  • Update the players in firestore
  • Update all locations where players is being used
  • All Client Files
  • All Functions Files
  • All Firestore Rules

Acceptance criteria:

  • players should be {[uid: string]: Player} instead of Player[]
  • everything else should still work
@mrjoshua520 mrjoshua520 self-assigned this Nov 10, 2022
@mrjoshua520 mrjoshua520 moved this from 🔖 Ready to 🏗 In progress in Project Backlog Nov 19, 2022
@mrjoshua520 mrjoshua520 linked a pull request Dec 5, 2022 that will close this issue
@mrjoshua520 mrjoshua520 moved this from 🏗 In progress to 👀 In review in Project Backlog Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

2 participants