Skip to content

DivyaGupta261/Cricket-Score-Board-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Match Simulator

This is a problem to simulate a cricket match with 4 players, in the last 4 overs.

Every batsman has the following probability,

Alt text

Back End :

The sample scoreboard output goes something like this,

Alt text

It is implemented in the back end using nodejs.

The tests was written using mocha.

Front End :

The front end is also implemented for this problem, and it looks something like this, Alt text

it can be viewed here,

https://limitless-fortress-23160.herokuapp.com/

The front end is developed using BackBonejs, bootstrap, js, jquery, css.

How to run :

Go to the root of the directory.

Start the server : npm start; (or) node index.js; Run tests : npm test; (or) mocha test/matchOutput.js; Front End Implementation : http://localhost:3000/ (in browser)

Refer package.json and more info on building tests, dependencies and other scripts available.

Code Flow :

A new set of teams are created in teams.js A new match is simulated using the teams in MatchSimulator.js

matchstat is a model that is maintained throughout a match

Update :

This code cleared the evaluation with a score of 4.2/5.

Alt text

Also received a lot of badges :)

About

To witness last 4 overs of a interesting cricket match, click here :

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published