tournament-js / tournament

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

Refactor GroupStage and TieBreaker results #8

Closed clux closed 11 years ago

clux commented 11 years ago

Both results method use a lot of similar stuff, but TieBreaker is based on the temporary posAry thing we create in there.

tieCompute, and probably a lot more can be shared between them in group_algs or somewhere.

clux commented 11 years ago

tieCompute was moved out, the other things are probably a bit too different.

There's still a lot of complexity in both these modules. Though while these things could possibly be done a little nicer and more elegantly, the ultimately tests pass.

clux commented 11 years ago

It's come to my attention that the pos property in TieBreaker is also being calculated slightly wrong: it's not the typically pessimistic calculation, it says you are all first until proven otherwise. This is unlike FFA and Duel and it should match these.

clux commented 11 years ago

Being worked on. Complicated logic.

clux commented 11 years ago

groupstage 0.3.0 is much better with this now - some room for improvement.

clux commented 11 years ago

This was done properly in 0.4.0 of groupstage. TieBreaker now a separate, general module anyway so a lot of it doesn't make any sense more.

Still worth it, because I needed to REALLY understand the commonalities of ties to realize i could make it more general.