Simple TGP calculator for IFPA tournaments under WPPR 5.2 (coming 2016). Tests are in spec (run with Jasmine). Available both as node module and in the browser (register the IfpaTGPTournament global).
View it in action at http://tgp.slapsave.com/