From fc6a2893e4e9d87d4752adba7675628a6152823a Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 10 Jan 2020 22:35:32 +0100 Subject: 2020.01.01 version (new KMP) --- http/api-inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'http/api-inc.php') diff --git a/http/api-inc.php b/http/api-inc.php index 041c8ff..64612d9 100644 --- a/http/api-inc.php +++ b/http/api-inc.php @@ -203,4 +203,18 @@ class ApiPkl { class ApiPklV1 extends ApiPkl {} +class ApiPklV2 extends ApiPklV1 { + + function calculate_kmp_points() { + // the line below works only because you can't play > 39 boards in KMP + // please kill me if it ever changes + $this->parameters['tournament_weight'] = 4; + $this->parameters['min_points'] = 0; + $intermediate = $this->calculate_points(); + $this->parameters['min_points'] = $intermediate['points'][1] + 10; + return $this->calculate_points(); + } + +} + ?> -- cgit v1.2.3