Giter Club home page Giter Club logo

odin-hangman's Introduction

Hangman Game

Introduction

This is a text-based Hangman game that was made as part of The Odin Project. This project is written in Ruby.

The project details can be found at Project: Hangman.

For more details about the game, see Hangman (board game)

How to Play

Try to guess the word by entering one letter at a time. You can only get 7 guesses wrong before losing the game. If you fully reveal the word, then you win.

There are some options you can enter during the game:

  • Help: Print out these options.
  • Print: Prints out the game board.
  • Quit: Leave the game.
  • Exit: Leave the game (same as Quit).
  • Restart: Start the game over.
  • Save: Save the game to file.
  • Load: Load a game that was previously saved and continue playing that.

For example, if you type "exit", the game will terminate.

All input is case insensitive.

Saving and Loading Games

All files will be saved to <game directory>/save_files, where <game directory> is wherever the hangman.rb file is located. If the directory does not exist, then it will be created.

For saving, the game will be converted to JSON format, then saved to a file, named by the player.

For loading, the game will read the file entered by the player, convert it to JSON, then convert that to the game object.

If either of these action fail, then a message is displayed and the current game just continues.

odin-hangman's People

Contributors

mike-c2 avatar

Watchers

 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.