Giter VIP home page Giter VIP logo

wordle-react's Introduction

data we need to track:

solution

5 letter string, e.g. 'drain'

past guesses

an array of past guesses each past guess is an array of letter objects [{}, {}, {}, {}, {}] each object represents a letter in the guess word {letter: 'a', color: 'yellow'}

current guess

string 'hello'

keypad letters

array of letter objects [{key: 'a', color: 'green'}, {}, {} ...]

number of turns

an integer 0 - 6

game process:

entering words:

user enters a letter & a square is filled with that letter when a user hits delete it deletes the previous letter when a user hits enter it submits the word if all squares are not filled with letters then the word is not submitted if that word has already been used in a prev guess then the word is not submitted

checking submitted words:

each letter is checked to see if it matches to the solution each letter is assigned a color based on it's inclusion in the solution

exact matches (correct position in the solution) are green

partial matches (in the solution but not the correct position) are yellow

non-matches (not in the solution at all) are grey

the guess is added to the grid with the correct colors the current guess moves to the next row the keypad letters are updated (colors)

ending the game:

when the guessed word fully matches the solution modal to say 'well done' when the user runs out of guesses modal to say 'try again'

wordle-react's People

Contributors

heessuh avatar

Stargazers

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