//This method does too much private static List <Dice> YatzyGame_LockPlayerDiceEvent(YatzyPlayer player) { string input = ""; Console.WriteLine("Keep any dice?"); while (true) { input = Console.ReadLine().ToLower(); if (!string.IsNullOrWhiteSpace(input)) { break; } } //Checks if you want to keep any dice switch (input) { case "yes": break; case "y": break; case "no": break; case "n": break; default: Console.WriteLine("wrong input"); break; } Console.WriteLine("what dice #'s would you like to keep?(index)"); //Keep Dice method KeepDice(input); return(player.playerDice); }
/// <summary> /// Checks what values <paramref name="player"/>'s dice have /// </summary> /// <param name="player"></param> private static void YatzyGame_checkDice(YatzyPlayer player) { Console.WriteLine(player.Name + " has these dice:" + player.CheckDice()); }