Assignment 2: Lost Fortune 2.0 *Program must be executed using NodeJS* Introduction: In this assignment we will demonstrate an understanding of conditionals and loops. 1. Create a new file named lost_fortune_20.js 2. Create variables to store the adventurer names, number of adventurers killed, number of survivors and the leader name. -Leader name = Captain Thomas King -Adventurer names = George, Tim, Sarah, Mike and Edward -Number of adventurers killed = 3 3. The survivors is equal to the number of adventurers - number killed 4. Display "Welcome to The God Among Us" 5. Display the introduction to your story as: "A group of adventurers began their search for the mystical god said to live among us. In charge of the squad was Captain Thomas King, who was famous for his past exploits. Along the way, the group of comrades were attacked by the god's loyal followers. The adventurers fought with bravado and strength under the tutelage of Captain Thomas King and the followers were defeated but still Captain King's group suffered great losses. After a headcount of the remaining squad, three members were found to be dead which left only two remaining survivors." 6. Display the current game statistics 7. After you display your introduction, extend your storyline by coming up with four options for the user to choose from in the story such as: 1) Enter the village hut? 2) Eat a turkey leg? 3) Sit on the stool? 4) Lay in the bed? The options should make sense within your existing story line. Display these options to the user. 8. Prompt the user to select an option. 9. Display another part of the story line based on the option the user selected.
Assignment 2: Lost Fortune 2.0
*Program must be executed using NodeJS*
Introduction: In this assignment we will demonstrate an understanding of conditionals and loops.
1. Create a new file named lost_fortune_20.js
2. Create variables to store the adventurer names, number of adventurers killed, number of survivors and the leader name.
-Leader name = Captain Thomas King
-Adventurer names = George, Tim, Sarah, Mike and Edward
-Number of adventurers killed = 3
3. The survivors is equal to the number of adventurers - number killed
4. Display "Welcome to The God Among Us"
5. Display the introduction to your story as:
"A group of adventurers began their search for the mystical god said to live among us. In charge of the squad was Captain Thomas King, who was famous for his past exploits. Along the way, the group of comrades were attacked by the god's loyal followers. The adventurers fought with bravado and strength under the tutelage of Captain Thomas King and the followers were defeated but still Captain King's group suffered great losses. After a headcount of the remaining squad, three members were found to be dead which left only two remaining survivors."
6. Display the current game statistics
7. After you display your introduction, extend your storyline by coming up with four options for the user to choose from in the story such as:
1) Enter the village hut?
2) Eat a turkey leg?
3) Sit on the stool?
4) Lay in the bed?
The options should make sense within your existing story line.
Display these options to the user.
8. Prompt the user to select an option.
9. Display another part of the story line based on the option the user selected.
10. Track user lives:
The user should start the game with 3 lives. One of your story options should result in the user losing a life.
After each option, display the updated statistics.
11. Prompt the user to play again. If yes, start your game over, if not, end the game and say goodbye!.
12. Modify the game to allow the user to enter their name as the leader name.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images