public void decreaseTest()
        {
            int shipSize = 10;
            HealthBar target = new HealthBar(shipSize);
            target.decrease();
            target.decrease();
            Assert.AreEqual(80, target.currentHealth);

            target = new HealthBar(4);
            target.decrease();
            target.decrease();
            target.decrease();
            Assert.AreEqual(25, target.currentHealth);
            
        }
Exemple #2
0
 public void removeHealthBar(HealthBar healthbar) {
     healthBars.Remove(healthbar);
 }
Exemple #3
0
 public void addHealthBar(HealthBar healthbar) {
     healthBars.Add(healthbar);
 }
Exemple #4
0
 public Ship(Shape shape)
 {
     this.shape = shape;
     healthBar = new HealthBar(shape.size);
 }