forked from yaseenagag/BlackJack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (30 loc) · 1 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Imports
const prompt = require('./src/prompt')
const Game = require('./src/game')
const help = require('./src/help')
const start = () => new Game;
//Game Intro
console.log( "Welcome to Yaseen, John and Jared's BlackJack" )
console.log( "Extended from Jrob Harman and Yaseen's work" )
// console.log( "Welcome to Yaseen, Jrob & Harman's BlackJack" )
const promptForAction = function(){
var option = prompt.forString("'h', or 'HELP' for rules & 's' or 'START' to start a game: \n >>").toUpperCase()
if (option === 'H' || option === 'HELP'){
help()
}
if (option === 'S' || option === 'START'){
start()
}
}
promptForAction()
// if (humans > 2){
// console.log('This game has a maximum of 2 human players. Setting human players to 2')
// humans = 2
// }else{
// if ((ai + humans) > 5){
// console.log('This game has a maximum of 5 total players. Setting total players to max')
// let ai = (5 - humans)
// }
// console.log('human players: '+human+' AI players: '+ai)
// }
//