Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment 1: Lost Fortune *Program must be executed using NodeJS* Introduction: In this assignment we will demonstrate an understanding of conditionals and loops. Using Notepad++

Assignment 1: Lost Fortune

*Program must be executed using NodeJS*

Introduction: In this assignment we will demonstrate an understanding of conditionals and loops.

Using Notepad++ to create a game, create a new file named lost_fortune_20.js

1. 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

The survivors is equal to the number of adventurers - number killed

2. Display "Welcome to The God Among Us" and 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."

3. Display the current game statistics

4. 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 and prompt the user to select an option.

5. Display another part of the story line based on the option the user selected.

6. 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. 7. Prompt the user to play again. If yes, start your game over, if not, end the game and say goodbye.

8. Modify the game to allow the user to enter their name as the leader name.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

Which prognostic factors are related to aphasia recovery?

Answered: 1 week ago

Question

Comprehend the concept of the "psychological contract."

Answered: 1 week ago