tournament-js / tournament

A tournament base class for static tournament types
MIT License
64 stars 13 forks source link

isPlayable should check if the game is unscorable #34

Closed rigoparis closed 7 years ago

rigoparis commented 7 years ago

I noticed that isPlayable doesn't check if the game is unscorable... for instance... I'm at round 3 of a Duel with all games scored and I want to edit a match from Round 1, the isPlayable validation returns true even if editing that match would cause a history rewrite and possibly leave the tournament in an invalid state... and if you think about it, a game is playable only if its scorable.

clux commented 7 years ago

Well, isPlayable is checked in unscorable, along with other conditions (including the subclass override _verify) , so it's designed to be a much lighter check.

The history overwrite thing is only a thing unscorable was ever designed to handle.

I will concede that the names for these functions are a bit unintuitive and misleading though.