Skip to content

Connecting an API and retrieve data from it to create a question game using bash.

Notifications You must be signed in to change notification settings

bltomlin/trueOrFalse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

trueOrFalse

All successful programmers work hard. But they need to relax too. A way to get relaxed is to play computer games. In this project, I created a question game with the help of the curl utility.

WARNING

The game will not work on any machine, unless authorized and configured for JetBrains Academy.
The game was developed on an internal network using an interal API.

1. Installation

# clone the repo
$ git clone https://github.com/bltomlin/trueOrFalse

# change the working directory to trueOrFalse
$ cd trueOrFalse

# run trueOrFalse
$ bash trueOrFalse

2. Examples

Example 1:

Welcome to the True or False Game!

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 2
File not found or no scores in it!

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 3
File not found or no scores in it!

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 0
See you later!

Example 2:

Welcome to the True or False Game!

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 1
What is your name?
> hyper

Pong is the first commercially successful video game
True or False?
> True
You are a genius!

The first mechanical computer - The Babbage Difference Engine - was designed by Charles Babbage in 1922
True or False?
> False
Wonderful!

Rihanna is a rugby player
True or False?
> False
Awesome!

Bright brothers had invented the first successful airplane
True or False?
> False
You are a genius!

The heaviest land mammal is the African bush elephant
True or False?
> False
Wrong answer, sorry!
hyper you have 4 correct answer(s).
Your score is 40 points.

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 1
What is your name?
> jet

The International Space Station circles the globe every 900 minutes
True or False?
> False
You are a genius!

The Sun is 109 times wider than Earth
True or False?
> True
Wonderful!

John Bardeen - Walter Brattain - William Shockley invented the first working transistors at Bell Labs
True or False?
> False
Wrong answer, sorry!
jet you have 2 correct answer(s).
Your score is 20 points.

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 0
See you later!

Example 3:

Welcome to the True or False Game!

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 2
Player scores
User: hyper, Score: 40, Date: 2022-05-08
User: jet, Score: 20, Date: 2022-06-19

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 0
See you later!

Example 4:

Welcome to the True or False Game!

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 3
File deleted successfully!

0. Exit
1. Play a game
2. Display scores
3. Reset scores
Enter an option:
> 0
See you later!

About

Connecting an API and retrieve data from it to create a question game using bash.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages