From 8fbfa863374aa2abf4575eb33dfc75c29e17836b Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Thu, 18 Mar 2021 03:35:45 +0100 Subject: [PATCH] Added estimize stars --- src/stars.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/stars.js b/src/stars.js index 999742e..78803ee 100644 --- a/src/stars.js +++ b/src/stars.js @@ -45,6 +45,15 @@ function calculateStarsElicit(data) { return starsInteger } +function calculateStarsEstimize(data) { + let nuno = data => 2 + let eli = (data) => null + let misha = (data) => null + let starsDecimal = average([nuno(data)]) //, eli(data), misha(data)]) + let starsInteger = Math.round(starsDecimal) + return starsInteger +} + function calculateStarsForetold(data) { let nuno = data => 2 let eli = (data) => null @@ -169,6 +178,9 @@ export function calculateStars(platform, data) { case "Elicit": stars = calculateStarsElicit(data) break; + case "Estimize": + stars = calculateStarsEstimize(data) + break; case "Foretold": stars = calculateStarsForetold(data) break;