Example #1
0
        public ShipInstance(Position pos, Rotation r, Ship ship)
        {
            this.pos = pos;
            this.rotation = r;
            this.ship = ship;

            this.sunken = false;
        }
Example #2
0
        public bool TestShipDuplicate(Ship ship)
        {
            //var results = from shipinst in ships where shipinst.ship == ship select shipinst;

            List<ShipInstance> results = ships.Where(x => x.ship == ship).ToList();
            if (results.Count > 0)
                return true;
            else
                return false;
        }