Giter VIP home page Giter VIP logo

mastermind-webapp's Introduction

Welcome to Mastermind Webapp!

Mastermind is a code-breaking game originally played by two people, the codemaker and codebreaker.

This Webapp acts as the codemaker by pseudo-randomly selecting a set of four colours. Your job as the codebreaker is to guess the combination of colours in the correct position within 10 attempts.

Ready for the challenge give it a go: https://mastermind-web.netlify.app/

How to play?

  1. Starting from the bottom of the board, look for the highlighted Row of Tiles and select a colour combination by tapping each tile repeatedly until you have your desired colour.
  2. Click the Submit button once you've chosen a colour for all 4 Tiles, The App will then grade your combination with the Orange number on the left indicating how many colours are correctly guessed but are in the wrong position, whereas the Green number on the right indicates how many coulers are correctly guessed and positioned.
  3. Using the Grading determine your next set of colours and repeat until you have found the correct combination or you run of turns, whichever comes first.
  4. GG HF!

Technical Info

This app was built with React & Typescript and Bootstrapped with the Typescript CRA template

npx create-react-app my-app --template typescript

Jest Unit Tests are used to ensure the Grading logic works correctly.

test('Sanity', () => {
    expect(isSane()).toBe(True);
})

npm run test -t 'Sanity'
>> Tests:       1 failed, 1 total

Hosted using Netlify! An all-in-one platform for automating modern web projects.

Useful links

mastermind-webapp's People

Contributors

seandendrijver98 avatar

Watchers

 avatar

mastermind-webapp's Issues

Store Game results for Sharing

We need to store each row's results for when sharing the results.

It should identify each correct colour and incorrectly placed colour as well as the total count of each for every row

Add Pre Rendering for better SEO ranking

Pre-Rendering

With pre-rendering, you run your SPA on a headless browser, like Chrome, Firefox, or PhantomJS, in your development environment. You then take a snapshot of your page output, and then you substitute the HTML files with this snapshot in the response to the server request.

Pre-rendering is similar to SSR, except the rendering takes place during pre-deployment and not on a live server. This rendering process can also be incorporated into a build flow with Gulp, Webpack, and more.

The main advantage to using pre-rendering is that it does not require a Node.js production server and neither does it add any unwanted load to your production server.

That said, pre-rendering also has its drawbacks:

It is not compatible with pages that display dynamically changing data such as news websites
Pre-rendering is not suitable for pages that contain information specific to a user, for example, a user account page that contains personal details. But these types of pages are less critical for SEO since you wouldn’t want to index these pages anyway.
Each route in the SPA will have to be pre-rendered individually. This could take a large amount of time if the SPA is very large.

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.