static void Main(string[] args)
bool[] box = new bool[13];
int player1Lives = 3, player2Lives = 3;
while (rollCount < 20 && player1Lives > 0 && player2Lives > 0)
Console.WriteLine($"\nPlayer {currentPlayer}'s turn. Press Enter to roll the dice.");
int rollTotal = RollDice();
Console.WriteLine($"You rolled a total of {rollTotal}");
Console.WriteLine("That total has already been rolled!");
Console.WriteLine($"Player 1 loses a life! Remaining lives: {player1Lives}");
Console.WriteLine($"Player 2 loses a life! Remaining lives: {player2Lives}");
Console.WriteLine($"Player {currentPlayer} wins!");
currentPlayer = (currentPlayer == 1) ? 2 : 1;
Console.WriteLine("Game over! 20 rolls reached.");
Console.WriteLine("Player 1 has no more lives! Player 2 wins!");
else if (player2Lives == 0)
Console.WriteLine("Player 2 has no more lives! Player 1 wins!");
Console.WriteLine("Game over! No player has rolled all totals between 2 and 12.");
Random rnd = new Random();
int dice1 = rnd.Next(1, 7);
int dice2 = rnd.Next(1, 7);
static void DisplayBox(bool[] box)
Console.WriteLine("\nBox Status:");
for (int i = 2; i <= 12; i++)
Console.WriteLine($"{i}: {(box[i] ? "Rolled" : "Not Rolled")}");
static bool CheckWon(bool[] box)
for (int i = 2; i <= 12; i++)