Variable Difficulty Method

So in my attempt to make the BullsCows game I simply did this to make a variable difficulty setting which scales with the words you provide instead of having the amount of attempts static.

From FBullCowGame.cpp

int32 FBullCowGame::GetMaxTries() const
{
    int32 tries = ceil(MyHiddenWord.length() * 0.5);
    return tries;
}

Let me know what you think.

I did something similar but just multiplied by 2 as it seemed to follow the flow chart between anxiety and boredom… I feel like 0.5 is erroring a bit on the anxiety side (4 guesses for a 7 letter word?):stuck_out_tongue:

But I agree on making it a dynamic number of tries based on the length of the word as being a better solution all around :wink:

The problem here is that the difficulty rises exponentionally per newly added wordlength, so you’d need to have some kind of function in there (mathematicaly speaking, not a coding funtion) to make it work as intended.

Even though this could result in a real difficulty setting, rather than a manualy defined one, i don’t think it’s worth the hassle as you’ll probably never have enough playtesting to get the right function to exponentionally increase the amount of tries you get.

Privacy & Terms