Code Monkey home page Code Monkey logo

cli-games's Introduction

CLI Games

Games in the terminal

Run on Repl.it

CLI Games is a community-driven collection of games that could be run in your terminal! Currently this project has many games including,

  • Hangman
  • Maze Escape
  • Text Adventures
  • Tic-Tac-Toe
  • Rock, Paper, Scissors

And more in the future!

How to Install?

Installation is very simple.

#Clone the repo
git clone https://github.com/salif/cli-games.git
cd cli-games
#install the dependences for the games (for Unix systems and Lunix)
bash install-games.sh

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

Read the README file in the respective directory to get more instruction about installation and playing. Most of the games support different languages (including node-js and python) and the choice is yours!

for Unix/Linux

just type

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

Want to contribute this project? We are happy to accept your contributions! You can do the following to contribute us

  • Making / Implementing suggestions and new features
  • Creating / Fixing bug reports
  • Improving the performance
  • Creating new games
  • Spreading the word!

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 πŸ˜„

This project is driven on community basis. So we are happy to accept your contributions a lot!

cli-games's People

Contributors

aresiel avatar danyshaanan avatar dnhuan avatar dragmakex avatar exiam avatar ferreirarodrigo avatar jackelinenascimento avatar joseasouza avatar kevinunger avatar kharisisriyant avatar ksslng avatar luis-martinez avatar mantasio avatar marioaleixo avatar mlauret avatar moxxiq avatar ohiofi avatar paul-cl-ark avatar pietroiaia avatar rafacazal avatar rbezerra avatar salif avatar seal62 avatar seniru avatar smollet777 avatar stefanoszisidis avatar tomasbranda avatar toni500github avatar valerybriz avatar vasilhstoskas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cli-games's Issues

Showing letters

A letter which is being shown the first time may be hidden in a word. So we have to check this letter even if it is already shown at the beginning of the game
Screenshot_20191021_194415

  • fix js version
  • fix python version

Add more CLI games

As I've seen so far, there is only one game for this entire repository. It would be great if somebody can add more games to this.

Here are some suggestions

  • Easy
    • Simon says game
    • Tic-Tac-Toe
    • Text adventures
  • Medium
    • Maze escape game
  • Hard
    • Shooter game
    • Snake game

The Hangman game need translations and new words

Hello everyone, the Hangman game need translations and words.

Translate

If you want to translate the game to your language, copy en-us.json file in words directory and rename it to [your-language].json(e.g. zh-hk.json), then translate it and send pull request.

Add words

If you want to add new words, choose language from words directory, add words to "words" field and send pull request.

Add more maps to Maze Escape game

Currently there are only 6 maps for the maze escape game and that amount is very less. Any volunteer can add more maps to the game if they like

Info and Guidelines

  • You must be familiar with JSON
  • You must follow the guidelines in the README for map creation (just for your own good)

πŸŽ† πŸŽ† πŸŽ† Good luck and happy hacktoberfestπŸŽ† πŸŽ† πŸŽ†

New game suggestion

I have recreated few CLI games using rust programming language. Those games are from the book called "invent your own computer games with python". The one I am proposing is "Sonar", my version differs from the original slightly though.

Sonar: three treasure chests are hidden under the ocean, which is basically 60x15 grid. Player has 20 sonar devices to discover those chests. User enters x and y coordinates of a spot he/she wants to drop the device. Once its dropped user receives a signal if the device is close enough to any of the chests. Signals are "Strong" - chest is less than 1-2 cells away, "Normal" - less than 3 cells away and "Weak" - which means chest may be away as far as 4 cells. Unlike original game, distance is calculated as difference in x + y coordinates. (p.s I can make instructions which player can read at any time).

Please let me know if you're interested.

ModuleNotFoundError when playing hangman [python]

When I started to play the hangman in python I got a ModuleNotFoundError with the following stack trace.

Traceback (most recent call last):
  File "hangman.py", line 5 in <module>
    import pyfiglet
ModuleNotFoundError: No module named 'pyfiglet'

Steps to reproduce

  • Move to the hangman directory
cd hangman
  • Run
 python hangman.py

System information

> cmd
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. all rights reserved

> python -VV
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)

adding game choise file

i have created a simple games.sh file so that you don't need to do cd game and exec the js/py file
requirements: you need to run anyways npm install and pip install -r requirements.txt where it's required (ask here if you want an install.sh file for doing it auto)
ps: where there are js and py files, i choose to run the python file but you can just replace it with npm run play (on TicTacToe you need to run instead node tictactoe.js)
it's on https://github.com/Toni500github/cli-games/blob/master/games.sh

pls don't judge, i don't program and i'm a newbie and i'm learning shell and C#, not python lol

Create a README for the landing page

Since contributions to this project are growing faster, we have to add a README page to involve the community more and help them for some contents.

Here are some ideas for things that should be in the README

  • About this project
  • How to install / Play?
  • Contribution guidelines (a separate contribution guideline file would be better though)
  • Other information

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.