BullCowGame randomising hidden word selection

srand(time(NULL));
    PrintLine(TEXT("Hello, Player.\nWelcome to the Bull Cow Game!"));
    HiddenWord = WordList[rand() % WordList.Num()];
    Lives = HiddenWord.Len(); 
    bGameOver =false;

I didn’t know about rand range when I wrote this so I used the triplex lecture to implement random word selection, since I was tired of seeing the same word all the time in my gameplay.

1 Like

Nice job!

Privacy & Terms