Skip to content
Max Arnold edited this page Sep 15, 2021 · 17 revisions

Welcome to the national-team-generator wiki!

Plan / Task List

  1. Create National Team Generator
    • Make it so only male first names are queried.

    Might be a good idea to remove all the female only names from the firestore database. It should cut the collection by at least a third.

  2. Allow for saving of generated teams
    • Create a button that allows you to write the data to Firestore in a separate collection.
    • Player data can be written to the user's document in a subcollection
    • Player data then can be fetched with a load button with only one set of saved data at a time (for now)
    • Create a page or section that allows you to load the team data.
    • This can be loaded instead of the generate team html and can be closed out of.
  3. Create an interface that allows for drag-drop functionality so that allows for teams to be created. (Like Football Manager)
  4. Create a scoring system and leaderboard to judge the quality of teams created.
  5. Create a tournament that can be entered with a generated team that will be simulated like Football Manager.

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.
Clone this wiki locally