freemanb2 / indiana-melee-stats

0 stars 2 forks source link

Tighten up Display Score parsing #8

Closed freemanb2 closed 1 year ago

freemanb2 commented 1 year ago

The score "Blitz | - 2 - zhj 1" gives an error because the logic current looks for the substring " - " in the DisplayScore, finds the character before it, and calls that player 1's score. This doesn't work in this case because " - " is preceeded by "|", so an error is thrown when we try to cast that character to an int.

I'm having trouble coming up with a universally correct approach, given silly but possible examples of tags that people could use, so I'm just skipping calculating elos for sets where the score can't be parsed properly.