Skip to content

FreeCodeCamp project: Create a number guessing game (Bash script) that runs in the terminal and saves user information.

Notifications You must be signed in to change notification settings

CheilaDaSilva/number_guessing_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

💻Project: Number Guessing Game

game banner

Project Goal

Create a number guessing game (Bash script) that runs in the terminal and saves user information.

Project made as part of the FreeCodeCamp Relational Databases Beta Certificate course

Process

Database was created in PostgreSQL to insert and store user information and game history.

Tables:

  • 'Games' - stores game history, including the user_id, the number of guesses inputed before finishing game and the 'secret number'.
  • 'Players' - stores usernames (and corresponding user_id) so bash script will recognised new and returning users.

The Bash script runs the game until the 'secret number' is found.

Based on the user input it provides hints to say whether the guess made is lower or higher than the 'secret number'.

The script recognised if the users are new or returning players based on their username and updates the database anytime a new user is detected.

It also stores the game history for both new and returning players, which is updated whenever a new game starts.


🎮 Can you guess the secret number?

🥳 Give it a go, and have fun!

About

FreeCodeCamp project: Create a number guessing game (Bash script) that runs in the terminal and saves user information.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages