jrahmatinl / poolstagesimulator Goto Github PK
View Code? Open in Web Editor NEWA prototype simulator for competitions within a pool/group stage
A prototype simulator for competitions within a pool/group stage
This method is a little too large. In general, methods over 20 lines of code indicate a code smell & may become hard to follow.
Someone noted that sometimes one team end up first in the list without scoring points.
Currently, all existing competition managers are setup to use the ICompetitionManager.RunCompetition
method with a participant & an opponent as parameters. This doesn't allow matches with more than 2 teams & is only usable for games like hockey, soccer, Ammerican football etc.
A quick search on stackexchange suggest that having more than 2 teams is possible in some sports & games, so it would nice to support this so that the simulator becomes more generic.
The play method in the PoolStageSimulator is too bloated & has too much responsibility. None of the code in the simulator actually seems to be doing any simulation.
At the very least the play method should be split into multiple shorter methods.
Consider doing something with random value generation mentioned in issue #1 Instead of doing things like composing pool stage results that don't belong in the simulator!
BestTeamsWinMostOfTheTimes makes a guesses the test to be correct if the best teams end up more than twice. It might be better to mock some values instead.
Maybe in such a way that the best teams have a worst and best case scenario, only loose one match by accident, but compromise with points in the remaining matches.
Some links that might help achieve this are:
https://github.com/nunit/docs/wiki/Random-Attribute
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.