Pretty way to set bGameIsWon

Instead of using
if(BullCowCOunt.Bulls == WordLength)
{
bGameIsWon = true;
}
else
{
bGameIsWon = false;
}

You can simply just use

bGameIsWon = (BullCowCount.Bulls == WordLength);

it does the same thing, it sets the bool to true if the statement is true and to false if the statement is false!
Just thought I would share so you guys can clean up your code in the future if you would like!

1 Like

This is not an error just something I thought I would share.

1 Like

Privacy & Terms