示例#1
0
 public void Recieve(Pellet pellet)
 {
     if (pellet != null)
     {
         minOrderPerShip[pellet.source].Add(pellet);
         this.pellet = pellet;
         Visit(battleShips[pellet.source]);
     }
 }
示例#2
0
 public void ReduceHealth(Pellet pellet)
 {
     if (!isSunk)
     {
         health -= pellet.size;
     }
     if (health < 0)
     {
         isSunk = true;
     }
     //Console.WriteLine(this);
 }