The Final commit before turn-in (hopefully)
This commit is contained in:
parent
44a4cf65bd
commit
77cb3f4613
8 changed files with 265 additions and 148 deletions
|
|
@ -14,22 +14,29 @@ console.log(" / / ) / / / ) / / / o / / ) / )
|
|||
console.log("_/________(___(_/___/___(___/_(___(__(_ __o_____/____/_(___/_/___/_(___ _(__)_(___/_/_/__/_(___ _____/_____|__(___/_(___(_(___/___\n\n");
|
||||
await sleep(1);
|
||||
|
||||
console.log("What would you like to do?");
|
||||
console.log("--------------------------");
|
||||
console.log("1) Start new game");
|
||||
console.log("2) Learn How to play");
|
||||
console.log("3) Quit Game");
|
||||
console.log("4) Credits\n");
|
||||
var mainMenuInput;
|
||||
while (true) {
|
||||
console.log("What would you like to do?");
|
||||
console.log("--------------------------");
|
||||
console.log("1) Start new game");
|
||||
console.log("2) Learn How to play");
|
||||
console.log("3) Quit Game");
|
||||
console.log("4) Credits\n");
|
||||
mainMenuInput = userInput("Enter: ");
|
||||
|
||||
var mainMenuInput = userInput("Enter: ");
|
||||
if (mainMenuInput != "1" && mainMenuInput != "2" && mainMenuInput != "3" && mainMenuInput != "4") {
|
||||
console.log("Invalid input. Please enter 1, 2, or 3.");
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch(mainMenuInput) {
|
||||
case "1":
|
||||
startGame();
|
||||
break;
|
||||
case "2":
|
||||
console.log("Follow the link below for a game manual.")
|
||||
console.log("[ENTER LINK HERE]")
|
||||
console.log(food);
|
||||
break;
|
||||
case "3":
|
||||
console.log("Quitting Game...");
|
||||
|
|
@ -39,19 +46,7 @@ switch(mainMenuInput) {
|
|||
console.log("Credits:");
|
||||
console.log("Bethesda Game Studios - The Fallout IP and related characters/lore");
|
||||
console.log("Readline-sync - NPM package used for async collection of user input");
|
||||
break;
|
||||
case "5":
|
||||
var thing1 = [1,2,3,4,5,6,7,8,9];
|
||||
var thing2 = [];
|
||||
var thing3 = [];
|
||||
thing2 = thing1
|
||||
while (thing3.length < 6) {
|
||||
let randomPick = randomNumber(1,thing2.length);
|
||||
thing3.push(thing2[randomPick]);
|
||||
thing2.pop(randomPick);
|
||||
}
|
||||
console.log(thing2);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
function startGame() { // So far what I have is filler and testing, feel free to change.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue