Code Monkey home page Code Monkey logo

letter-game-in-ruby's Introduction

Motus

A terminal command game based on a famous French TV show called Motus. Work in progress but the main features are already available.

Built With

  • Ruby 2.4.2
  • Tested with Rspec 3.8
  • One gem depency to generate random words called....random-word.

Running the tests

We have two classes : Game and RandomString available under the lib folder. And we have their respective test files under the spec folder.

In order to run the test, just type rspec in terminal and press Enter:

rspec

A series of green dots show that all the tests have passed.

Getting Started

We need to install the dependencies (just one gem) before getting started

bundle install

We can then start the game by executing the runner.rb file:

ruby runner.rb

How to play

The aim of the game is to find a random 5 letter word (generated by the random-word gem). The player has 10 attempts, and if she fails to find the word, she loses and the correct response is displayed.

The player gets clues along the way. Each letter has a position : 1, 2, 3, 4, 5. The game will give the following information for each letter in the player's response :

  • WELL DONE! --> when it is the correct letter at the right position
  • correct letter wrong spot --> when the word contains this letter, but it is not located at the right position
  • LETTER NOT IN ANSWER --> when the word does NOT contain this letter at all.

letter-game-in-ruby's People

Contributors

pablo123github avatar

Watchers

James Cloos avatar

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.