diff options
Diffstat (limited to 'engine.py')
-rw-r--r-- | engine.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engine.py b/engine.py index 26a5bab..bc08a43 100644 --- a/engine.py +++ b/engine.py @@ -1,7 +1,13 @@ import fuel class Engine(): - def __init__(self, name: str, thrust: int, flow_rate: float): + def __init__(self, name: str, isp: int, max_flow_rate: int): self.name = name - self.thrust = thrust - self.flow_rate = flow_rate \ No newline at end of file + self.max_flow_rate = max_flow_rate + self.isp = isp + + def thrust(self, throttle: int): + return self.flow_rate(throttle) * self.isp + + def flow_rate(self, throttle: int): + return self.max_flow_rate * (throttle / 100) \ No newline at end of file |