From bcde7699bb17b96a1a22dc26577b7ecbed65868e Mon Sep 17 00:00:00 2001 From: garrettmills Date: Sun, 8 Nov 2020 11:40:46 -0600 Subject: [PATCH] Narrow matchup projection randomization range --- app/models/Matchup.model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/Matchup.model.js b/app/models/Matchup.model.js index 1d8556c..86cd457 100644 --- a/app/models/Matchup.model.js +++ b/app/models/Matchup.model.js @@ -49,10 +49,10 @@ class Matchup extends Model { const data = { date: '2020-11-11', // TODO generate this in the matches patch team_1: home_team.team_name, - team_1_projection: await (await home_team.lineup())?.calculate_fantasy_points() + Math.round(Math.random() * (5 - (-5)) + (-5)), + team_1_projection: await (await home_team.lineup())?.calculate_fantasy_points() + Math.round(Math.random() * (2 - (-2)) + (-2)), team_2: visitor_team.team_name, - team_2_projection: await (await visitor_team.lineup())?.calculate_fantasy_points() + Math.round(Math.random() * (5 - (-5)) + (-5)), + team_2_projection: await (await visitor_team.lineup())?.calculate_fantasy_points() + Math.round(Math.random() * (2 - (-2)) + (-2)), } if ( data.team_1_projection < 0 ) data.team_1_projection = 0