public Hangman() { hangmanFile = new HangmanFile(); hangmanWord = new HangmanWord(hangmanFile.GetWordFromWordList()); numberOfGuesses = 6 + hangmanWord.ToGuess.Length; currentIndexGuessed = 0; livesRemaining = 6; lettersGuessed = new char[numberOfGuesses]; Guessed = false; }
private void newGame() { ResetLetters(); Random r = new Random(); int index = r.Next(dataWords.getWords(level).Count); hangmanWord = new HangmanWord(dataWords.getWords(level)[index]); updateWordMask(); timeElapsed = 0; timer1.Start(); pgbLife.Maximum = TIME; pgbLife.Value = TIME; picuterBox.Load("../../Resources/pictures/Gallows0.jpg"); }
/// <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; }
/// <summary> /// Метод за стартување на нова игра. /// </summary> private void newGame() { Random r = new Random(); int index = r.Next(words.Length); hangmanWord = new HangmanWord(words[index]); 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; }
public void newGame() { seconds = 10 * 60; wordPicker = new WordPicker(); String word = wordPicker.pickNextWord(); hangman = new HangmanWord(word); wordGuess.Text = hangman.refreshGuessed(); triedLetters.Text = hangman.refreshTotalLetters(); tbGuess.Clear(); pbTimer.Minimum = 0; pbTimer.Maximum = 10 * 60; pbTimer.Value = 10 * 60; pbWrongCounter.Minimum = 0; pbWrongCounter.Maximum = HangmanWord.MAX_GUESSES; pbWrongCounter.Value = 0; timerTime.Start(); }
/// <summary> /// Метод за стартување на нова игра. /// </summary> private void newGame() { Random r = new Random(); int index = r.Next(words.Length); hangmanWord = new HangmanWord(words[index]); 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; }