Up until now, all the info about Participants has been stored in the GameManager and referenced throughout. I propose that, instead, a Participant class should exist which holds
a reference to the player object
the team and score info
any other relevant info about the participant for the game they are in, such as alive status and such.
Each Game/context should have its own implementation of the Participant interface, because they need to know different info about the participant (e.g. are they alive, have they voted, etc.).
There should also be a Team implementation which holds the members of the team for easy iteration and comparison. Too often I find myself iterating through members asking what team they are on and if they're on the same team as someone else. It's confusing and tedious.
Reason for Redesign
Too often one of the data tracker maps (Map<UUID, ...> someData) gets out of sync. This is hard to maintain because there are so many lists and maps. If there is only one list (List<Participant> participants) or a map from UUID to that, this will make it much more consistent.
Proposed Redesign
This will require some experimentation.
Definition of Done
a detailed list of all tasks which must be completed for the issue to be called "done". Must use the checkbox bullet point - [ ]
[ ] task A
[ ] task B
Other notes
This will be useful for testing. If you can create x number of fake players and have the entity representing them be an armor stand, for instance, then you can test 10 4-person teams with only 1 or 3 real players.
Description
Up until now, all the info about Participants has been stored in the
GameManager
and referenced throughout. I propose that, instead, aParticipant
class should exist which holdsEach Game/context should have its own implementation of the Participant interface, because they need to know different info about the participant (e.g. are they alive, have they voted, etc.).
There should also be a
Team
implementation which holds the members of the team for easy iteration and comparison. Too often I find myself iterating through members asking what team they are on and if they're on the same team as someone else. It's confusing and tedious.Reason for Redesign
Too often one of the data tracker maps (
Map<UUID, ...> someData
) gets out of sync. This is hard to maintain because there are so many lists and maps. If there is only one list (List<Participant> participants
) or a map from UUID to that, this will make it much more consistent.Proposed Redesign
This will require some experimentation.
Definition of Done
a detailed list of all tasks which must be completed for the issue to be called "done". Must use the checkbox bullet point
- [ ]
Other notes