distance: Fix calculation of disntance

This commit is contained in:
Marco Thomas
2022-07-27 14:48:58 +02:00
parent d6a8689175
commit 57d977d4e6
3 changed files with 8 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ def calc_co2(distance: float, kind: TransportKind) -> float:
return 0
else:
# TODO: CITY == AUTOBAHN
return distance * TransportMethod.CITY.value.co2
return (distance - 1) * TransportMethod.CITY.value.co2
case TransportKind.TRAIN:
# TODO: OPENV == ICE
return distance * TransportMethod.ICE.value.co2