/// <summary> /// Builds the final round end game output. /// Precondition: None /// Post-condition: None /// </summary> /// <param name="value">The value of the case.</param> /// <returns>The formatted output for the final round end of game output</returns> public static string BuildFinalRoundEndGameOutput(int value) { var formattedValue = CurrencyFormatter.FormatTwoDecimals(value); return("Congrats! You win " + formattedValue + Environment.NewLine + Environment.NewLine + "GAME OVER"); }
/// <summary> /// Builds the end of round output. /// Precondition: None /// Post-condition: None /// </summary> /// <param name="offers">The offers.</param> /// <returns>The formatted output for the end of round summary.</returns> public static string BuildEndOfRoundOutput(ICollection <double> offers) { return(formatMaxMinAvgOfferOutput(offers) + Environment.NewLine + "Current Offer: " + CurrencyFormatter.FormatTwoDecimals(offers.Last()) + Environment.NewLine + "Deal or No Deal?"); }
private static string formatMaxMinAvgOfferOutput(ICollection <double> offers) { return("Offers: Max: " + CurrencyFormatter.FormatTwoDecimals(offers.Max()) + ";" + " Min: " + CurrencyFormatter.FormatTwoDecimals(offers.Min()) + Environment.NewLine + " Average: " + CurrencyFormatter.FormatTwoDecimals(offers.Average())); }
/// <summary> /// Builds the no deal button output. /// Precondition: None /// Post-condition: None /// </summary> /// <param name="offers">The offers.</param> /// <returns>The formatted output when no deal button is pressed</returns> public static string BuildNoDealButtonOutput(ICollection <double> offers) { return(formatMaxMinAvgOfferOutput(offers) + Environment.NewLine + "Last Offer: " + CurrencyFormatter.FormatTwoDecimals(offers.Last())); }