Get current player
I’m building a structure for a game which has up to 6 teams and each “team” can have 1 or 2 players in it.
I have a view model for a team (team colour, team score etc) and a view model for a player (player name, avatar, which is set up as a property of the team vm).
My question is, is there a way to have a “isCurrentTeam” boolean in the team view model which I can then query to get the data to show the current team details, or do I have keep updating separate “curentTeamNumber”, “currenTeamColour” data points in the main view model?
I guess what i’m looking for is a way to check if a Team instance “has” a value of true for isCurrentTeam and if so display the data from that instance.