diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..408254c Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40b878d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ \ No newline at end of file diff --git a/Nora-First-Individule-Project-.js b/Nora-First-Individule-Project-.js new file mode 100644 index 0000000..9e10692 --- /dev/null +++ b/Nora-First-Individule-Project-.js @@ -0,0 +1,25 @@ + +// Not done yet: The game displays initial instructions about how to play + +//The game asks the user for his/her name and displays a welcome message + +var readlineSync = require('readline-sync'); +var userName = readlineSync.question('What is your name ? '); +console.log('Have you heared the greatest news ' + userName + ' ?! YOU are HERE!\n \nThinking about your feelings...'); + +//As a user, I want to be able to make decisions during the game +//The user must enter a string to make a decision +//The user must enter a number to make a decision +//There are at least 10 opportunities to make a decision + + feelings = ['Happy', 'Lazy', 'Angry', 'Sad'], + index = readlineSync.keyInSelect(feelings, 'How do you feel ?'); +console.log('From 1 to 5 how ' + feelings[index]); +var scale = readlineSync.question(' are you (when 1 is th lowest and 5 is the highest)? '); + + +//Invalid entires are re-prompted + + + + diff --git a/package-lock.json b/package-lock.json index 4e5e2be..c047f7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,25 @@ { "name": "FSW-Text-Based-Adventure", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "readline-sync": "^1.4.10" + } + }, + "node_modules/readline-sync": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz", + "integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==", + "engines": { + "node": ">= 0.8.0" + } + } + }, "dependencies": { "readline-sync": { "version": "1.4.10", diff --git a/textBasedAdventure.js b/textBasedAdventure.js deleted file mode 100644 index d392b19..0000000 --- a/textBasedAdventure.js +++ /dev/null @@ -1,5 +0,0 @@ -const readline1 = require('readline-sync') - -let nameInput = readline.question("Enter your name: ") - -console.log(`Hello ${nameInput}! Welcome to my game.`)