-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
other directories structure already made and planned as per the requirement.
- Loading branch information
1 parent
4cd52e0
commit 4db433a
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
/* | ||
* Entry file | ||
* takes input from the user and passes to subsequent route. | ||
*/ | ||
|
||
var _game = { | ||
on:false, | ||
answerMode:0, | ||
word:'', | ||
hintCounter:0, | ||
}; | ||
|
||
function main(input) { | ||
|
||
if(!_game.on){ | ||
input = input.split(' '); | ||
require('./routes/routes')(input,_game); | ||
} | ||
else{ | ||
require('./routes/game.route')(input,_game); | ||
} | ||
} | ||
console.log("It has started"); | ||
// taking input form user | ||
process.stdin.setEncoding('ascii'); | ||
process.stdin.on('data', (input)=>{ | ||
main(input.trim()); | ||
}); |