From 50621901bccebfc14d17442a10d9a693f2e16200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20J=C3=BAnior?= Date: Thu, 18 Apr 2024 21:00:20 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20corrigir=20pontua=C3=A7=C3=A3o=20de=20ca?= =?UTF-8?q?pit=C3=A3o=20no=20c=C3=A1lculo=20de=20parciais?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cartolafc/api.py | 4 ++-- cartolafc/constants.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cartolafc/api.py b/cartolafc/api.py index 5c297bb..0dfc454 100644 --- a/cartolafc/api.py +++ b/cartolafc/api.py @@ -3,7 +3,7 @@ import requests -from .constants import MERCADO_ABERTO, MERCADO_FECHADO +from .constants import MERCADO_ABERTO, MERCADO_FECHADO, MULTIPLICADOR_CAPITAO from .errors import CartolaFCError, CartolaFCOverloadError from .models import ( Atleta, @@ -247,7 +247,7 @@ def _calculate_parcial(time: Time, parciais: Dict[int, Atleta]) -> Time: time.jogados += 1 if tem_parcial else 0 if atleta.is_capitao: - atleta.pontos *= 2 + atleta.pontos *= MULTIPLICADOR_CAPITAO time.pontos += atleta.pontos diff --git a/cartolafc/constants.py b/cartolafc/constants.py index f0d793e..3e22d9c 100644 --- a/cartolafc/constants.py +++ b/cartolafc/constants.py @@ -1,2 +1,4 @@ MERCADO_ABERTO = 1 MERCADO_FECHADO = 2 + +MULTIPLICADOR_CAPITAO = 1.5