dozingcat / CardsWithCats

Hearts and Spades card games
GNU General Public License v3.0
19 stars 2 forks source link

Improve performance by removing redundant legal play checks #19

Closed dozingcat closed 1 year ago

dozingcat commented 1 year ago

If there are no legal plays (which should never happen) the card choosing functions will throw exceptions, so the separate check isn't necessary. This seems to reduce the Monte Carlo evaluation time by 10-20%.