我如何能够显示每个玩家在每轮结束时投出的分数?(我将 1 轮视为每位玩家 1 次投掷)
顺便说一句,如果玩家掷出 6,他们会再次掷骰。
Console.WriteLine("Player 1, enter your name");
PlayerOne = Console.ReadLine();
Console.WriteLine("Player 2, enter your name");
PlayerTwo = Console.ReadLine();
Console.WriteLine("Player 3, enter your name");
PlayerThree = Console.ReadLine();
Console.WriteLine("Player 4, enter your name");
PlayerFour = Console.ReadLine();
Random DiceRandom = new Random();
int DiceThrow = DiceRandom.Next(1, 7);
Console.WriteLine(DiceThrow);
Console.ReadLine();
for (int i = 1; i <= 4; i++)
{
DiceThrow = DiceRandom.Next(1, 7);
Console.WriteLine("Player " + i + " rolled a " + DiceThrow);
Console.ReadLine();
if (DiceThrow == 6) i--;
}
Console.WriteLine("Player 1 rolled a " + DiceThrow);
Console.ReadLine();
Console.WriteLine("Player 2 rolled a " + DiceThrow);
Console.ReadLine();
Console.WriteLine("Player 3 rolled a " + DiceThrow);
Console.ReadLine();
Console.WriteLine("Player 4 rolled a " + DiceThrow);
Console.ReadLine();