Coder Social home page Coder Social logo

mathler-clone's Introduction

Super Mathler

The next generation of Mathler!

Fresh Screenshot

Language / Technologies Chosen

  • npm
  • Typescript
  • React
  • Prettier
  • TailwindCSS
  • HeadlessUI
  • Cypress

Personal Requirements

  1. Mobile & Desktop platforms supported
  2. Nice UI / UX
  3. Dark Mode
  4. Fast!

Testing Strategy

  1. Unit test the game engine using Jest
  2. Component unit test React components using Jest and react-testing-library
  3. Test more complex global state interactions using E2E tests with Cypress

Game Rules

Initially I was not familiar with the rules of Mathler but I have obtained a full list from https://www.tomsguide.com/news/what-is-mathler-and-how-to-play, which are pasted below.

  1. You have to guess the solution in six goes or less
  2. Every equation you enter must be a valid answer. So if the answer is 20, your guess can't be 50+5-2 because that doesn't equal 20. Right away, this is one of the toughest things about it.
  3. The equations follow the PEDMAS rule, which means you do them in the order of parentheses, exponentials, division, multiplication, addition and then subtraction.
  4. A correct entry turns green
  5. A correct entry in the wrong place turns yellow
  6. An incorrect entry turns gray / red
  7. Digits and operations can be used more than once

Installation

  • npm install -f (This is needed because not all libraries being used are upgraded for React v18.0)

Run

The game is currently defaulting to have an answer of 73 and target result of 132 - 59. The value can be changed from the code but would ideally be set by some external service that changes those values daily.

  • npm run start

Running E2E Tests

The E2E tests require the website to be running

  • npm run test
  • npm run test:e2e

Additional Screenshots

Win Screen Screenshot Loss Screen Screenshot Alert Bubble Screenshot

mathler-clone's People

Contributors

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