Skip to content
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

Merged
merged 3 commits into from Dec 14, 2019

Conversation

wbourne0
Copy link
Contributor

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.

this commit was generated automatically on repl.it
@Seniru Seniru requested a review from salif December 10, 2019 08:18
@Seniru
Copy link
Collaborator

Seniru commented Dec 10, 2019

@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! 👏

Copy link
Collaborator

@Seniru Seniru left a 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

@wbourne0
Copy link
Contributor Author

Let me try and fix it

@wbourne0
Copy link
Contributor Author

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)

@wbourne0
Copy link
Contributor Author

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)
Copy link
Collaborator

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)

Copy link
Collaborator

@Seniru Seniru left a 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!

@wbourne0
Copy link
Contributor Author

Wdym? Run on Repl.it goes straight to a fork of this repository, and it should pull commits from it also.

@Seniru
Copy link
Collaborator

Seniru commented Dec 13, 2019

The badge links to your repository instead of salif's one. That should be corrected ☺

@wbourne0
Copy link
Contributor Author

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.

@wbourne0
Copy link
Contributor Author

Basically that repl just pulls from this repo.

@wbourne0
Copy link
Contributor Author

Oh and in my repl it still credits salifm, just so u know.

@Seniru
Copy link
Collaborator

Seniru commented Dec 14, 2019

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.

@wbourne0
Copy link
Contributor Author

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.

@Seniru
Copy link
Collaborator

Seniru commented Dec 14, 2019

OK! I'll merge this. Inform me after you did the script

Copy link
Collaborator

@Seniru Seniru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

@Seniru Seniru merged commit 16b2da2 into salif:master Dec 14, 2019
@Seniru
Copy link
Collaborator

Seniru commented Dec 14, 2019

Enjoy 🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants