internal static void PrintEndOfRoundDraw(Game.eGameStatus i_GameStatus, Player i_PlayerOne, Player i_PlayerTwo) { Ex02.ConsoleUtils.Screen.Clear(); string msg = string.Format( @"----------------------------------------- It's a Draw!! ----------------------------------------- ----------------------------------------- Current Scores ----------------------------------------- {0}'s score is: {1} {2}'s score is: {3} -----------------------------------------", i_PlayerOne.GetName(), i_PlayerOne.Score, i_PlayerTwo.GetName(), i_PlayerTwo.Score); Console.WriteLine(msg); }
private DialogResult declareGameWinner() { Game.eGameStatus currentGameStatus = m_Game.GetGameStatus; DialogResult dialogResultToReturn; if (currentGameStatus == Game.eGameStatus.Draw) { dialogResultToReturn = MessageBox.Show("Draw!\nWould you like to play another game?", "Game over", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); } else if (currentGameStatus == Game.eGameStatus.Player1Win) { dialogResultToReturn = MessageBox.Show(string.Format("Game status: {0} Won\nWould you like to play another game?", m_UserNames[0]), "Game over", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); } else { dialogResultToReturn = MessageBox.Show(string.Format("Game status: {0} Won\nWould you like to play another game?", m_UserNames[1]), "Game over", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); } return(dialogResultToReturn); }
internal static void PrintEndOfRoundWin(Game.eGameStatus i_GameStatus, Player i_WiningPlayer, Player i_LosingPlayer) { Ex02.ConsoleUtils.Screen.Clear(); string msg = string.Format( @"----------------------------------------- Congrats! The winner of this round is {0}!! Better luck next time {1}. ----------------------------------------- ----------------------------------------- Current Scores ----------------------------------------- {0}'s score is: {2} {1}'s score is: {3} -----------------------------------------", i_WiningPlayer.GetName(), i_LosingPlayer.GetName(), i_WiningPlayer.Score, i_LosingPlayer.Score); Console.WriteLine(msg); }