nicolafan / pyleague-soccer-simulation

A Python soccer championship simulation
MIT License
5 stars 3 forks source link

feat: add generate time for goals #9

Closed yahayaohinoyi closed 2 years ago

yahayaohinoyi commented 2 years ago

Fixes: #6

CONTEXT Generate time for goals. Random times are needed to be generated for the goals scored by both teams which could be from the space 0-90mins

METHOD Used fisher shuffle algorithm to randomly assign times to goals for both teams

nicolafan commented 2 years ago

It's perfect, I didn't think this could be done in 4 lines and be so readable. I'll open an issue to document this in the same docstyle used in this file. If you want you can do it in another PR. Thank you!