private void newGame() { hangmanWord = new HangmanWord(wordSelector.pick()); timeElapsed = 0; timer1.Start(); pbTime.Maximum = MAX_TIME; pbTime.Value = MAX_TIME; pbWrong.Maximum = HangmanWord.MAX_ATTEMPTS; pbWrong.Value = 0; //hangmanWord.WrongAttempts; tbLetter.Enabled = true; btnGuess.Enabled = true; updateMasks(); }
/// <summary> /// Метод за стартување на нова игра. /// </summary> private void newGame() { hangmanWord = new HangmanWord(wordSelector.pick()); updateWordMask(); updateGuessedLetters(); timeElapsed = 0; updateTime(); timer1.Start(); pbTime.Maximum = TIME; pbTime.Value = TIME; pbWrong.Value = hangmanWord.WrongCount; pbWrong.Maximum = HangmanWord.MAX_WRONG_COUNT; tbLetter.Enabled = true; btnOK.Enabled = true; }