Toaninja / Gladius

0 stars 0 forks source link

Enhancement (modification) - Interface between league and match engine, passing matches #5

Closed nsmangat closed 3 years ago

nsmangat commented 3 years ago

Reason for modification: Stemming from the previous enhancement of avoiding round robin format in our initial release, how the matches are passed between the league and match engine can be accomplished much easier.

Location: Match engine after array of gladiators and league object are produced.

Solution: Instead of using a struct of matches, the league engine can just pass the array of randomly generated gladiators as well as the player gladiator. The gladiator class now has a matchMarker member starting at 0. Every time a random gladiator fights the player gladiator, the match marker will be incremented by 1. When it is at 2, the random gladiator has fought all their matches against the player for the season.

Version: 1.0

Toaninja commented 3 years ago

Looks good, I will make sure to implement this change to my module.