Ejemplo n.º 1
0
        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);
            
        }
Ejemplo n.º 2
0
 public void removeHealthBar(HealthBar healthbar) {
     healthBars.Remove(healthbar);
 }
Ejemplo n.º 3
0
 public void addHealthBar(HealthBar healthbar) {
     healthBars.Add(healthbar);
 }
Ejemplo n.º 4
0
 public Ship(Shape shape)
 {
     this.shape = shape;
     healthBar = new HealthBar(shape.size);
 }