Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
public class ResultDisplay
{
// Display the result of a single round
public void DisplayRoundResult(RoundResult result, int playerBalance)
{
// Display the winning number, winning color, bet type, bet amount, winnings, and player balance
Console.WriteLine($"Winning Number: {result.WinningNumber}, Winning Color: {result.WinningColor}, Bet Type: {result.Bet.Type}, Bet Amount: {result.Bet.Amount}, Winnings: {result.Winnings}, Player Balance: {playerBalance}");
}
// Display the history of all rounds played
public void DisplayHistory(List<RoundResult> roundResults, int currentBalance)
{
// Display the header for the round history
Console.WriteLine("Round History:");
// Initialize round count
int roundCount = 1;
// Iterate through each round result and display it
foreach (RoundResult result in roundResults)
{
// Display the round number
Console.WriteLine($"Round {roundCount++}:");
// Display the details of the round
DisplayRoundResult(result, currentBalance);
// Add an empty line for better readability
Console.WriteLine();
}
}
}