clamshell icon indicating copy to clipboard operation
clamshell copied to clipboard

Count all blunders

Open MarcManiez opened this issue 2 years ago • 3 comments

Hello team Otrego, and thank you for providing this library :pray: . I've been using it on a project, and realized the blunder detection wasn't tracking black's blunders (only white's).

This code does a few things, in addition to fixing the above:

  • Refactors FindBlunders. Hopefully you find this useful, but I'm happy to change it back if needed
  • Adds an option to set the blunder threshold
  • Adds an option to filter blunders by color
  • Adds some test data: a game, and its analysis. This idea being to make testing for this feature a little easier to follow.
  • Adds a couple of tests:
    • one to check that all blunders are found, and
    • one to ensure the custom threshold works

Thanks for your review!

MarcManiez avatar Jan 11 '23 06:01 MarcManiez