diff --git a/.editorconfig b/.editorconfig index 2b2869d..19c2e91 100644 --- a/.editorconfig +++ b/.editorconfig @@ -16,3 +16,8 @@ indent_style = space indent_size = 4 trim_trailing_whitespace = true insert_final_newline = true + +[*.sh] +indent_style = tab +indent_size = 4 +insert_final_newline = true diff --git a/LICENSE b/LICENSE.txt old mode 100755 new mode 100644 similarity index 100% rename from LICENSE rename to LICENSE.txt diff --git a/MazeEscape/package-lock.json b/MazeEscape/package-lock.json new file mode 100644 index 0000000..7f26689 --- /dev/null +++ b/MazeEscape/package-lock.json @@ -0,0 +1,41 @@ +{ + "name": "maze-escape", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "maze-escape", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "ansi-escapes": "^4.2.1" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/README.md b/README.md old mode 100755 new mode 100644 index ae4595f..03f5c99 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ CLI Games is a community-driven collection of games that could be run in your te *And more in the future!* -# How to Install? +## How to Install? Installation is very simple. @@ -25,8 +25,10 @@ cd cli-games bash install-games.sh ``` -# How to Play? -### for windows +## How to Play? + +### for Windows + After cloning, run `dir` to get a list of available directories of games. Then navigate to your favourite game using the `cd` command **Eg:** `cd Hangman` @@ -35,13 +37,14 @@ Read the **README** file in the respective directory to get more instruction abo Most of the games support different languages (including `node-js` and `python`) and the choice is yours! ### for Unix/Linux + just type -```sh +```bash bash games.sh ``` and select the game by the number or 'e' for exit. If a game has a JS and Python version, you can choose which one you prefer you to play -# Contributing +## Contributing Want to contribute this project? We are happy to accept your contributions! You can do the following to contribute us @@ -51,7 +54,7 @@ Want to contribute this project? We are happy to accept your contributions! You - [Creating new games](#creating-new-games) - Spreading the word! -## Creating new games +### Creating new games Before creating a new game, please check if it is available already, or somebody is working on creating that game. Then make sure to create a new issue to make sure others are OK with it. If you got approval for your suggestion, then move one! Code your game and create a PR with the new changes. We'll be happy to introduce your new game :smile: diff --git a/Snake/package-lock.json b/Snake/package-lock.json new file mode 100644 index 0000000..b4b90f7 --- /dev/null +++ b/Snake/package-lock.json @@ -0,0 +1,42 @@ +{ + "name": "snake", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "snake", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "ansi-escapes": "^4.3.0" + }, + "devDependencies": {} + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/TextAdventures/package-lock.json b/TextAdventures/package-lock.json new file mode 100644 index 0000000..48f1fd3 --- /dev/null +++ b/TextAdventures/package-lock.json @@ -0,0 +1,41 @@ +{ + "name": "text-adventures", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "text-adventures", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "prompts": "^2.2.1" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "engines": { + "node": ">=6" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + } + } +} diff --git a/games.sh b/games.sh index 2de327b..409f020 100755 --- a/games.sh +++ b/games.sh @@ -20,7 +20,7 @@ case $option in read game case $game in "js"|"JS"|"Js"|"jS"|"Javascript"|"javascript") - cd $dir/Hangman && node hangman.js + cd $dir/Hangman && node index.js ;; "py"|"python"|"PY"|"Python") cd $dir/Hangman && python3 hangman.py @@ -51,7 +51,7 @@ case $option in read tictactoe case $tictactoe in "js"|"JS"|"Js"|"jS"|"Javascript"|"javascript"|"j") - cd $dir/TicTacToe && node tictactoe.js + cd $dir/TicTacToe && node index.js ;; "py"|"python"|"PY"|"Python"|"p") cd $dir/TicTacToe && python tictactoe.py diff --git a/install-games.sh b/install-games.sh index 918b023..2888ca9 100755 --- a/install-games.sh +++ b/install-games.sh @@ -6,7 +6,7 @@ text_not_installed="dependencies not installed, please refer the problem log abo printf "Installing Hangman dependencies... \n" -pip install pyfiglet lolcat +pip install -r requirements.txt printf "Installing MazeEscape dependencies... \n" @@ -39,5 +39,5 @@ else exit 1 fi -printf "Dependences installed succesfully" +printf "Dependences installed succesfully\n" exit 0