Skip to content
Phil Killewald edited this page Jul 24, 2015 · 3 revisions

Teams should be the simplest data structure in the code base, because they are essentially static representations of the data that live in the DataStore. The basic elements of a Team are simple, and revolve mostly around the display of the team on the client side:

  • Name
  • Logo
  • Colors (optional?)

Discussion

Tournament-specific information

Should Teams store Tournament-specific information or not? Specifically, should they contain the following fields:

  • Seed?

  • Whether or not the team is eliminated?

  • Other predictive covariates specific to a Tournament?

  • Pros of including these:

  • With seed information, the Team can be displayed with relevant Tournament information without other checks against the DataStore. For example, a Game could be displayed between two Teams, and a seed could be displayed next to the appropriate Team, all without any knowledge of the Tournament or its structure.

  • With elimination information, a PredictedGame could be displayed for the User with the proper Teams crossed out, all without additional checks against the Tournament's MasterBracket. In addition, the potential values of PredictedGames could be calculated quickly, without the need to ask the MasterBracket.

  • With other predictive covariates, the Game's probability of win could be quickly determined without other requests to the DataStore.

  • Cons of including these:

  • If Tournament-specific information is stored with the Team, then every Tournament would need a new set of Teams defined and stored in the DataStore.

  • For display purposes, additional requests have to be made to the DataStore anyway, as Teams are almost never displayed outside of the context of a Game or Tournament (but see this possible enhancement)

Other possible solutions:

  • Store the Tournament-level information in the place where it is needed. This means seed and elimination information with the Tournament in a Map of some sort, and predictive covariates as a separate data structure for use specifically by the Expect-o-Matic.