distance: Fix calculation of disntance
This commit is contained in:
2
graph.py
2
graph.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user