Like my answer to the previous set of questions here:
How do I link a checkbox to an image/random result in visual studio 2010 using C# .....[
^], you would hold the player related data, like the score, in a class. If there are multiple rounds, then you would have a Round class.
public class Round
{
public int Score { get; set; }
public List<Die> Dice { get; } = new List<Die>
{
new Die(),
new Die(),
new Die(),
new Die(),
new Die(),
new Die()
};
}
public class Player
{
public string Name { get; set; }
public List<Round> Rounds { get; set; } = new List<Round>();
public int TotalScore { get { return Rounds.Sum(x => x.Score); } }
public Round CurrentRound { get { return Rounds.LastOrDefault(); } }
}
Then to use...
public readonly List<Player> Players = new List<Player>();
Players.Add(new Player { Name = "Fred });
Player currentPlayer = Players[0];
' add a new round
currentPlayer.Rounds.Add(new Round ());
' current round
Round currentRound = currentPlayer.CurrentRound;
' current score
int currentPlayerScore = currentPlayer.TotalScore;
Now you can have a multi-player game.