Exemple #1
0
 /** This method is called upon request to restart the game.*/
 internal void Restart()
 {
     Ex02.ConsoleUtils.Screen.Clear();
     this.m_Won     = false;
     this.m_Board   = new Board(m_NumberOfDesiredGuesses, r_SequenceLength);
     this.m_BoardUI = new BoardUI(m_Board, out m_NumberOfDesiredGuesses, r_SequenceLength);
     this.m_Board.NumberOfGuesses = m_NumberOfDesiredGuesses;
     this.m_NumberOfTrys          = 0;
 }
Exemple #2
0
 /**Class constructor*/
 public BullsAndCowsGame()
 {
     m_Won = false;
     m_PlayerWantToPlay      = true;
     m_Board                 = new Board(m_NumberOfDesiredGuesses, r_SequenceLength);
     m_BoardUI               = new BoardUI(m_Board, out m_NumberOfDesiredGuesses, r_SequenceLength);
     m_Board.NumberOfGuesses = m_NumberOfDesiredGuesses;
     m_NumberOfTrys          = 0;
 }