From: Eric S. Raymond Date: Mon, 16 Oct 2006 14:55:36 +0000 (+0000) Subject: A bit more code compression. X-Git-Tag: 2.0~62 X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=commitdiff_plain;h=d0c7d6f85627cc409bf8826f61d6bbce3e3a3c4c;ds=sidebyside A bit more code compression. --- diff --git a/src/sst.py b/src/sst.py index 992b1c9..08616b8 100644 --- a/src/sst.py +++ b/src/sst.py @@ -5145,11 +5145,8 @@ def status(req=0): if not req or req == 2: if game.condition != "docked": newcnd() - dam = 0 - for t in range(NDEVICES): - if game.damage[t]>0: - dam += 1 - prstat(_("Condition"), _("%s, %i DAMAGES") % (game.condition.upper(), dam)) + prstat(_("Condition"), _("%s, %i DAMAGES") % \ + (game.condition.upper(), sum(map(lambda x: x > 0, damages)))) if not req or req == 3: prstat(_("Position"), "%s , %s" % (game.quadrant, game.sector)) if not req or req == 4: