Did my Pseudo code just help me figure out the whole game?!

So I started to write my pseudo code and got the general list down by putting in the comments where I thought things should logically go and decided to go on a short walk to clear up some brain fog I’d been having today.
On my walk I was running through the code in my mind and as I envisioned the IDE page and the comments in my mind.

I began to wonder how I was going to accomplish the tasks I needed to check for isograms, etc. and I think that I was able to basically distil the game’s core foundation down to 4 if/else statements.

Feel free to comment and let me know what you think (obviously as I follow along on the lectures I will be proven wrong/right!)

I don’t know the keywords for isogram or the keywords to use to check the number of letters etc, but I imagine it would go something like this

/* The basic game can be completed with 4 if/else statements;

1- if (Input == isogram)
    {return true;}
   else
    { PrintLine(TEXT("That's not an isogram"));
      PlayGame;      
    }
    
2- if (InputLetterCount == WordLetterCount)
    {return true;}
   else 
    {
    PrintLine(TEXT("wrong number of letters"));
      PlayGame;
    }
    
3- if (input == HiddenWord)
    { PrintLine (TEXT("You win!"));
    }
   else
4-    { if (Lives >= 0)
        { 
        --Lives;
        PrintLine (TEXT("Wrong word! you now have " Lives " left!\nPress enter to try again"));          
        }
     else
        { PrintLine (TEXT("Nope! Not it!\nYou've run out of lives\nGame Over...\nPress enter to play again!\nYou can quit by pressing Tab.");
          PrintLine HiddenWord;
        }
    */
1 Like

You are thinking like a programmer now! Great job! :+1:

Privacy & Terms