New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it easy for people to play the games #70
Conversation
this commit was generated automatically on repl.it
@allawesome497 thanks for contributing! This idea is awesome as it let people to play the games without worrying about cloning this repo to their machines. I tested this game with repl.it and I found some problems with this. It doesn't load the game correctly and throws an error. Here is an example what game
Hangman
MazeEscape
TextAdventures
TicTacToe
Hangman
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '/home/runner/Hangman/index.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
exit status 1 Hope you could fix this problem. Also make the prompt more friendly (I think you know what I mean :P). Otherwise this is good! 👏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes requested. More info can be found in the conversation
Let me try and fix it |
Ok i fixed it, the only thing I have added to it is a simple bash script to let the user choose which game they want to play (I also renamed a few files to simplify it) |
Here is the bash script in case you want to see it: npm i prompts; npm i ansi-escapes; echo Which game do you want to play?; echo Hangman; echo MazeEscape; echo TextAdventures; echo TicTacToe; read game; node $game/index.js``` |
Games in the terminal | ||
> Games in the terminal | ||
|
||
[![Run on Repl.it](https://repl.it/badge/github/salifm/cli-games)](https://repl.it/@AllAwesome497/cli-games) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this should link to the main repo (salif's one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the badge should link to the repl of this repository. Other than that the work is perfect!
I think you can fix this small problem and the PR would be merged soon!
The badge links to your repository instead of salif's one. That should be corrected ☺ |
As far as I know salif does not have a repl for it. If they would like to i'd be happy to help them set it up though. |
Basically that repl just pulls from this repo. |
Oh and in my repl it still credits salifm, just so u know. |
I just want to make sure the repl get updated when there are changes to salif's repo. If yes, then this PR will get merged. |
I can say for certain that it works every time if u make a selection menu to run the games. I'll make an addition to my run script later to make sure it automatically pulls and then runs it. |
OK! I'll merge this. Inform me after you did the script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
Enjoy 🎉🎉🎉 |
I made a script that uses your script and lets the user play the games on repl.it, this will direct the user to it.