Game Loop Examples

Here’s the Game ‘loop’ I came up with in the challenge for this lesson.

image

image
Made on draw.io

I had a couple of simple game loops in mind one with less detail and one with more which also had the game loop back on itself to give further instructions if the answer is wrong but there is more lives left or go ahead and pick a new word/ increase the difficulty if the player is correct in her guess. However I settled for the more simple version shown below

image

this is the full loop

I misunderstood lol and made a quick while loop in notepad;
FString HiddenWord = “paint”;
std::cin >> Guess;

while (HiddenWord != Guess)

{
std::cin >> Guess;

}

if (HiddenWord == Guess)

{
std::cout << TEXT(“Well Done!”);

}

I made the game as if in each word “game” you have 3 guess.

2 Likes

Here’s my loop for Bulls and Cows :slight_smile:

This is my loop.
BullCowsScreen1

Forgot my penmenship sucks.

The condition for checking if the incorrect guesses is fewer than 5 has the yes/no conditions reversed.

This is my version of the Bull Cows basic game loop.