From c7cd836096d433bf2a99552e3adf032b20b7a533 Mon Sep 17 00:00:00 2001 From: Nora Ahmed Date: Wed, 6 Jan 2021 00:16:27 -0500 Subject: [PATCH] Incomplete Project --- .DS_Store | Bin 0 -> 6148 bytes .gitignore | 1 + Nora-First-Individule-Project-.js | 25 +++++++++++++++++++++++++ package-lock.json | 19 ++++++++++++++++++- textBasedAdventure.js | 5 ----- 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 .DS_Store create mode 100644 .gitignore create mode 100644 Nora-First-Individule-Project-.js delete mode 100644 textBasedAdventure.js diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..408254c3361436556ca1a056a4f1994a71b5ce68 GIT binary patch literal 6148 zcmeHKv2NQi5Pft#sHq3HQ-&5$KEOu(2a2H-$k3v&KcJ2!!%ZStfgJ}Kwf7%_teyG~ znKJipy0m>q5`iq&b+QCOa0eXUk-R&RPZTKvF#ToP1KI!rs$g@6#Xm&)Mc1U^TUtb8 zbBr;^F%oofw&tx3%78NP)EJO&w}m5qvjZ$q{eEYd9%e-{&WbU8WP{kJcK=wRC2=zp zNHM_|FM)320&&Z27_G1g)4}O2YzP*w0Z5&fxq!02x z`&u2#h^euMPn_kPY<2K~``jE0oYOue4=L*x)RZg=2OWH7e}NO)iS_Ezt}$cYF>964 zH;h=)J0a%6zSVNP=H4ss^OWV(jwE9?soN3Io~^zg^Q)GjRm-p;t}(5}z2s;Q zxJqJtBz8H2boEJg1zlBE&|A)Rf=iZtj&?yirB6yGC*<^;T+C^0UzxJPs(D#e*~$RV zY?0uVLoJm7Wk4CYV?g$YkSZ8?EFIddgN3~U5SwhaLR)?nBqsD2c`O~WhhkhP(S;g+ z#V{_M?VsTbSA(>s z3@8K7iUHG%hjE`%@@MPX~TA2n&B4TSJcGU8)uKg<=pRkEKJlQ1nN@ M(x8Ph@Td&@1>rEh0{{R3 literal 0 HcmV?d00001 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.`)