GithubHelp home page GithubHelp logo

hamidbyte / guess-the-word-javascript-game Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.04 MB

Try it out https://whatword.netlify.app/

JavaScript 84.52% CSS 6.04% HTML 9.45%
game guess hangman javascript requirejs word html bootstrap5 css fontawesome

guess-the-word-javascript-game's Introduction

Hamid

๐Ÿ‘‹ Hi there, I'm Hamid
๐Ÿ–ค I love JavaScript and Python
๐Ÿ“Š I'm Full Stack Developer
๐Ÿ‘€๏ธ I'm looking to collaborate on open source.
๐ŸŒŽ You can reach me on LinkedIn.

This is my life's motto:

function wtfjs() {
    /* eslint no-console: "error" */
    console.log("b" + "a" + + "a" + "a")
    // "baNaNa"
}

๐Ÿ“ž Phone Number: 127.0.0.1
๐Ÿ  Address: localhost:3000

guess-the-word-javascript-game's People

Contributors

ammara-sadaf avatar hamidbyte avatar

Stargazers

 avatar

Watchers

 avatar

guess-the-word-javascript-game's Issues

In a single game same word should not repeat

As long as user did not refresh the page, user should not be able to see the same random word again.
Store the doneWords in an array and check if the random word is in the array or while acquiring random number it should not consider doneWords from the dataset.
But if the whole dataset is completed then reset the doneWords and start random from entire dataset again.

Store highestScore / bestScore in a game and display

At the moment it should be store in one game along with current game score.

  • currentScore will be the totalScore before one loses the game then it will be reset.
  • highestScore or bestScore will remain there until the website is refreshed.

Best will be to save highestScore in cloud.
When user achieve highestScore, there must be a popup congratulating for achievement.
We can create another ticket for it.

This ticket is dependent on another issue/ticket in which user must be asked to enter a name.

Keyboard takes bit of time to load

Maybe using one of this or think about it and come up with your own solution.
Also loading gif would be great until website loads.

addEventListener('DOMContentLoaded', (event) => {});
onDOMContentLoaded = (event) => { };

Datasets might consist of duplicate ids

In a test, category was shown as "Animal" but when the game finished, it said the word as "Apple".
It could be related to

  • duplicate entries in datasets
  • selecting more than one word and displaying first in the category element while other used in the logic.

Test this issue.

Increase health and new score method

  • Increase the Health and change hangman animation accordingly.

e.g. I recommend it should be at least 7

  • Score should be calculated based on how much health is used.

e.g. 3 basic score for winning a round + remaining health

Also update index.html with the information

ask for user's name

Ask for user's name to store their highest scores in the database along their name.

There must be three options:

  1. Enter name - run validator and trim on it
  2. Random Name - app should generate creative and funny names
  3. Guest / Anonymous - in this case highest score will not be post to database

calculate score a new way

Score should be calculated based on how much health is used.
e.g. 3 basic score for winning a round + remaining health

Show current round score on popup
Show 3 + remaining health = current score
Also update index.html with the information

three free hints, win more by winning without using health

3 Free Hints / More can be win by winning without using Health:

  • User will be given 3 free Hints in the beginning of every game.
  • User can win +1 Hint if they win a round without using any Health.
  • Display a message when user wins a Hint.
  • Display Hints as notification icon badge with total number of Hints.

Continue playing despite wrong guess or give-up without losing scores by using Lives

User can continue playing despite wrong guess or give-up without losing scores by using Lives

Add Lives feature:

  • There must be at least 1 life in the beginning of every game.
  • User can win +1 lives if they win 3 or 5 consecutive rounds.
  • Display a message when user wins a life
  • Display lives as notification icon badge with total number of lives

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.