Tips for Number Guessing game

After many hours of trouble shooting why steps failed either randomly or all of the time, I figured it out. Here are some tips to help solve it. Do not worry, no actual code will be here.

  1. If welcoming back users keeps failing, add a echo -e "\n to the start of the command. I am not sure if others need the new line added, but I know this one did.

  2. ALL of the $PSQL commands need to be put in variables, in order for the action not to show on the screen (eq. insert 0 1 or things like that). There can be no extra lines when you run the code, only the ‘too high’ ‘too low’ etc. So something like ADDUSER=$($PSQL" whatever goes here “). Apparently the tests count the number of lines or something like that, according to what I read. When I changed that, it fixed the issue with the " You guessed it in <number_of_guesses> tries” test.

  3. Press run multiple times, as sometimes the tests pass, and sometimes they fail.

This is thanks to the many posts I read that had some sort of fixes for it. I just hope this helps some people.