Giter Site home page Giter Site logo

hangman-game's Introduction

Hangman-Game

Hangman Game

Object

The goal of this game is to display empty spaces for the name of a cartoon character, which the player has seven guesses to solve.

JavaScript used

I created an array (tried to use array that matched a name with an image but everytime I used it I broke the game). The player's guesses count down or go in the word. If they miss seven letters, the solution is revealed in red. If they win, the solution is revealed in green (and here is where the image would show up).

I look forward to updating this to say the game is working COMPLETELY.

Update

I'm a little further down the road -- 6 weeks to be exact -- and with help from my tutor my hangman is working!

I tried all kinds of things, such as pairing my character name and image URL in an array, but I couldn't synch the character with the correctly guessed word. Until I inserted this code:

document.getElementById("challengeWord-img").src="assets/images/" + challengeWord + ".png";

I resave all my images as .pngs, and voila: Working game

hangman-game's People

Contributors

green64 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.