Git Product home page Git Product logo

cli-hangman's Introduction

CLI Hangman

Enjoy the classic game of hangman not in command line form!

Prerequisites

CLI Hangman requires node.js to be installed on your machine and the ability to use node package manager.

Installation

CLI Hangman can be installed by downloading this repo, then navigate to your CLI-Hangman directory. Within the directory run npm install to download all dependencies.

~/.../CLI-Hangman
npm install

Running CLI Hangman

Now that you have Hangman installed you can run node index.js in your command line.

You will be prompted to guess a letter, enter your letter and press the enter key. Repeat until you guess the word or you run out of guesses. Then play again!

Technology

Challenges

This was an exercise in constructor functions. You can see in this repo that I was working with word.js which contained my Word constructor and letter.js which contained my Letter constructor. At first I found it difficult to understand the relationship between the Word and Letter objects because these objects are not hard coded. I knew they were there but I had a hard time conceptualizing them. One solution that helped was simply calling the object that I was having trouble with, and use it as a visual aid to solve my problem. The other thing I noticed was that the longer I worked on this project and with constructor functions in general, the more I was able to take a invisible set of objects and visualize them in my mind without having to log them to the screen. I look forward to more practice so this becomes second nature to me :)

Author

Craig Melville

cli-hangman's People

Contributors

acekreations avatar

Watchers

James Cloos avatar  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.