Coder Social home page Coder Social logo

hmo_assessment's Introduction

Running the server locally

  1. Install all dependencies - composer install

  2. Copy and rename .env.example to .env or run cp .env.example .env

  3. Modify the database configuration for .env file

  4. Run php artisan key:generate

  5. Run php artisan migrate --seed

  6. Run composer install to install dependencies

  7. Start up the server - php artisan serve

  8. Server should be running on http://localhost:8000

  9. Access the API via http://127.0.0.1:8000/api/documentation

  10. Access the API on Heroku via http://game-catalog-hmo-assessment.herokuapp.com/api/documentation

Thought process building the application

  1. The API has two tables. 1 - The players, 2 - The gamepays

  2. Since I am to assume each game only allows a maximum of 4 players, and there are 5 games with different versions, a player can play any of the games as long as the team does not exceed 4. With 10,000 players, a maximum of 2500 games can be played for a particular game version per day.

  3. Assumption 2: Players can only play together if they have the same game versions: Mortal Combat 4 players can not play together with Mortal Combat 5 player.

  4. With the assumptions, I ran a seeder file to generate 10,000 players and for each player a nested loop was written to generate random games, game versions and game plays for a maximum of 4 games per player.

hmo_assessment's People

Contributors

ajadi473 avatar

Watchers

James Cloos avatar  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.