Creating a JavaScript code.

Words: 395
Pages: 2
Subject: Uncategorized

The point of this exercise is to better master Javasсrіpt functions, loops, conditionals, and some data types. ### **Project Requirements:** 1. Console must greet player with a fun message 2. Console must ask for the player′s name and store it 3. Walking: – The console will ask the user to enter a ″w″ to walk – Every time the player walks, a random algorithm will be run that determines if a wild enemy has appeared (A 1/3 or 1/4 chance of being attacked) – Use a while loop to control this flow. 1. If a wild enemy appears: – The enemy is random (can be chosen out of a minimum of 3 different enemy names) – The user can decide to attack or run – If attacking, a random amount of damage will be dealt between a min and max – If running, there will be a 50% chance of escaping – After the player attacks or runs the enemy attacks back for a random damage amount – The player and enemy will attack each other in a loop until one of them passes out or dies. – If the player kills the enemy you can give the Player some HP and a special item that is stored in the inventory. After this, the player will continue walking. – If the enemy kills the player the console prints a cool death message and the game ends 1. Inventory – When the player kills enemies, they are awarded with items – If the user enters ′Print′ or ′p′ in the console, the console will print the players name, HP, and each item in their inventory ### **Passing Criteria: Demo to the Instructor/TA & Code Review** An instructor or TA will look through your code with you and make sure you have a solid grasp on using functions, loops, and conditionals in JavaScript, as well as to verify that you′re following JavaScript code standards and good general programming practices. This project passes off the following levels of the Skills Tree: – Programming Principles, Level 2/h

Let Us write for you! We offer custom paper writing services Order Now.

REVIEWS


Criminology Order #: 564575

“ This is exactly what I needed . Thank you so much.”

Joanna David.


Communications and Media Order #: 564566
"Great job, completed quicker than expected. Thank you very much!"

Peggy Smith.

Art Order #: 563708
Thanks a million to the great team.

Harrison James.


"Very efficient definitely recommend this site for help getting your assignments to help"

Hannah Seven