clux/tournament — pull request #9 by llafuente (2013-09-22 14:16:29+00:00)
Title: Many useful functions

Hi,

I was working with this module for a few days and I found myself looping continuosly gathering some basic data so I implement many functions that will help you to extract the tournament status.

I dont know if you like camelcase or snakecase, in my case I prefer snake, I'll leave it up to you if you want to modify/rename some functions.

isRoundDone(round)
tells if every match in the round has score

getRounds()
return all rounds

getRound(round)
return round data

getMatches(round, removed_finished)
get matches list, alias of getRound if removed_finished=falsy

getMatch(match)
return match data

getCurrentRound()
return the fisrt round that some matches didn't have score

getNextRound()
return the fisrt round that some matches didn't have score

getPosition
return the fisrt round that some matches didn't have score

getPlayersIn
return the fisrt round that some matches didn't have score