Git Product home page Git Product logo

pragma-schooner-dice's Introduction

pragma-schooner-dice

Take-home assignment for Pragma.gg interview


Getting started

This is a Next.js project bootstrapped with create-next-app. It requires a NodeJS environment (I was using v20.9.0 when I made it) to run.

yarn install
# or
npm install

Relevant files

To make things nicer you, I built a simple web UI to interact with the score and topCategories functions you requested. The side-effect is that there are a lot of files that are irrelevant to that core logic, many of which were generated by the bootstrap mechanism I used.

The files directly relevant to this assessment are:

Interacting

You can launch the web UX by running the development server:

yarn dev
# or
npm run dev

Open http://localhost:3000 with your browser and you should see a simple dice form, which allows you to submit a dice roll for judgment and then view the top categories for that roll.

Unit tests

I also wrote a fair number of unit tests to illustrate the API. These tests are not exhaustive by any means, but you can find them in __test__/utils.test.js and run them via:

yarn test
# or
npm run test

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.