Jamee999 / cricket

Test match cricket simulator
61 stars 33 forks source link

West Indies player names repeated in scorecards #30

Closed DeondeJager closed 4 years ago

DeondeJager commented 4 years ago

Thanks for this awesome program! I'm really enjoying using it!

I came across a weird issue with v2.3, which I downloaded today (24 May 2020). I'm on Windows 10, with Python v3.8.2 running in PyCharm v11.06.

I simulated a league (customleague.py) with 9 custom country teams, each playing one another 2 times (so actually 4 times, twice home and twice away). Everything seems to work fine, except West Indies players' names are repeated in the scorecard, despite me having successfully added 11 unique players. I've attached my customteams.txt, my settings.txt (I just changed the weather to "England" and the year to "2019") and a scorecard from a match involving West Indies. As far as I can tell it only happens with West Indies.

scorecard8.txt customteams.txt settings.txt

Jamee999 commented 4 years ago

The issue is probably being caused by there being multiple teams with the name "West Indies" in the customteams.txt file, so more than one set of players is being loaded.

DeondeJager commented 4 years ago

That's probably it. My apologies. I didn't notice that West Indies was already in there. Thanks!