strong status added

main
moscowsky 4 weeks ago
parent 9f65622b63
commit 0a0e3db400

@ -3,13 +3,14 @@ import time
class RobotController(object):
def __init__(self, fire_ext_max_capacity = 5, collision_damage = 1, k_sof = 1, k_cas = 1, k_asset = 1):
def __init__(self, fire_ext_max_capacity = 5, collision_damage = 1, k_sof = 1, k_cas = 1, k_asset = 1, k_hp = 1):
# STATE VARIABLES
self._fire_ext_max_capacity = fire_ext_max_capacity
self._fire_ext_capacity = self._fire_ext_max_capacity
self._hit_points = 100
self._start_hp = 100
self._hit_points = self._start_hp
self._collision_damage = collision_damage
self._charge_points = 100
@ -21,6 +22,7 @@ class RobotController(object):
self._k_sof = k_sof
self._k_cas = k_cas
self._k_asset = k_asset
self._k_hp = k_hp
''' CONTROL '''
@ -46,10 +48,14 @@ class RobotController(object):
def send_pick_asset_cmd(self):
raise NotImplemented("")
def get_score(self, time_stamp):
score = self._k_sof * len(self._exted_sofs) + self._k_cas * len(self._found_casualty) + self.k_assest * len(self._found_assets)
def get_score(self, time_stamp = None):
score = self._k_sof * len(self._exted_sofs) + self._k_cas * len(self._found_casualty) + self._k_asset * len(self._found_assets) + self._k_hp * self._hit_points
return score
def get_str_status(self):
status = f"{type(self).__name__}\n - Total score {self.get_score()}\n - Hit points: {self._hit_points}/{self._start_hp}\n - Extingushed sources of fire {len(self._exted_sofs)}\n - Fire extinguiher capacity {self._fire_ext_capacity}/{self._fire_ext_max_capacity}"
return status
''' EVENTS '''
def _register_collision(self, time_stamp):

Loading…
Cancel
Save