@steeladept:
Thanks for downloading and playing! I'm sorry that it messed up for you, and thank you so much for the bug report!
the third game came up with the same error (perhaps it is the particular puzzle chosen?).
I am thinking that, because the game works without this error for many puzzles, it must be that some particularly long puzzles are causing this. I've changed the maximum phrase length from 300 to 400, and I'm adding some error-catching to suspect methods:
public const int MaxPhraseLength = 400;
} catch (Exception loadHangFileException) {
MessageBox.Show("Error in method loadHangmanFile()", loadHangFileException.Message);
}
} catch (Exception instantAndRunEx) {
MessageBox.Show("Error in method instantiateAndRunGame()", instantAndRunEx.Message);
}
but the letter shows twice in the guess box
I've updated the guess-handling code to check and see if the correct or wrong guess is already shown (this
should prevent duplicates; let me know if any continue to happen):
private void addWrongGuess(string wrongGuess) {
if (!WrongGuesses.Contains(wrongGuess)) {
_wrongGuesses += wrongGuess;
}
}
private void addUsedGuess(string usedGuess) {
if (!UsedGuesses.Contains(usedGuess)) {
_usedGuesses += usedGuess;
}
}
Another bug I am finding is not all letters show from puzzle to puzzle. They are not selected, but they are not listed if you are a mouse user.
I think this is a control-repainting issue. When this happens, try scrolling the vertical scrollbar the entire extent of the combobox and see if the letters don't seem to magically reappear. I'm working on a fix for this.
Perhaps in a future revision you can consider tracking if input was via mouse or keyboard to differentiate high scores?
I've noted the suggestion for a possible future version, and thanks!
I am not a mouse person in general, but when checking stuff out like this I find that is where most things break (at least in my programs).
+1.
Summary: hopefully, the 100-character increase in maxPhraseLength will fix the most glaring error. However, I've added error-handlers to a couple of highly suspect methods, which will pop up a much more info-rich messagebox and help me track down the bug, if it persists. Hopefully, the extra checking I've added to the missed versus correct guesses will solve that annoying bug too. Thanks again for taking the time to post, steeladept, and please let me know the results if you update to v1.0.4.1. You can update to the new version from within the program: "About"->"Update".