Haulien icon

Untitled

Haulien | PRO | 09/21/14 09:14:32 AM UTC | 0 ⭐ | 490 👁️ | Never ⏰ | []
text |

390 B

|

None

|

0 👍

/

0 👎

	public Creature mostDamagedCreature(){
        Creature mostDamaged = null;
        float mdHitpoints = 0f;
        for ( Creature c : creatureList ) {
            float damage = c.getMaxHitPoints() - c.getHitPoints();
             if (damage > mdHitpoints) {
                mostDamaged = c;
                mdHitpoints = damage;
            }
        }
        return mostDamaged;
	}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎