Skip to content

Additional Info

Max Arnold edited this page Jan 2, 2022 · 3 revisions

How Random Firestore Queries Work

Check out this Stack Overflow thread that explains different ways to grab random documents in Firestore.

In this section, I will explain which methods I use for grabbing random documents for the National Team Generator.

  1. For each First Name and Last Name document, there is a randomNum field. This field is a map, not an array. This is important. It includes 5 randomly generated numbers. We are using the random integer version from the stackoverflow thread.
  2. The next step is the bi-directional method.
  3. The next step is rinse and repeat method. Although, the keep it coming method should be looked into.
  4. As you could guess from the first step, we're using the multi-random method for ongoing randomness.

Clubs

Find information on how each player is assigned a club in this markdown file

Name Resources

Clone this wiki locally