Closed greenstack closed 4 years ago
Trying to make the Arenas fully generic ended up introducing more problems than it solved. Instead, Arena methods that query teams will instead have an optional generic version that allows the user to specify a specific type of team to retrieve. This places the responsibility of casting the team on the API instead of the end user. This also results in a smaller API change.
Currently, when a team queries an arena for any team, it needs to cast the team into the expected team implementation. By making Arenas somewhat generic, like
Arena<T> : IArena where T : ITeam
, teams can reasonably query the Arena for teams without needing to cast to the specific type.This will introduce several API changes and raises a few questions and concerns:
IArena
interface be genericized as well? Or should we have a non-generic arena?The following changes will also need to be made:
ArenaBuilder
class will also need to become generic.