Skip to content

seankeane/react-wordgame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React.js Word Game

This application is a word game similar to Wordle that was developed using React.js. The app allows you to choose the length of the word you want to guess - with options between 2 and 8 characters long.

The application integrates with Express.js API backend application available in the express-wordgame-api repository. The backend application uses the an-array-of-english-words npm package as its source dictionary. Based on this dictionary, the backend API returns a randomly generated answer in response to the GET /answer?length route and validates all guesses via calls to the GET /checkGuess?guess route.

Setup

Clone the repository, open directory with in terminal and run the following commands:

npm install

npm start

This runs app in the development mode so it is accessible on http://localhost:3000 to view it in your browser.

Walkthrough

On the start screen you are present with a number picker to choose the length of the answer word. This default to 5 but can be changed to any length between 2 and 8. Clicking the button below confirms the selection and starts the game.

start

When the game starts, you are able to enter your guesses. Press the Enter key to confirm your guess. Below the answer boxes, a list of the letters you have not yet guess is displayed and updated after each guess.

letters

If your guess shares a letter in the same position, it will be green. If a letter is present in the answer but in a different position it will be yellow.

checks

If you type an non-alphabetical character the box will show in red. If you type and enter a guess that is not a valid word, all boxes will turn red.

validations

Once you find the word, you will see a summary showing how long it took you to find the word and how many guesses you made. Here you can also click to go again.

results

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published