public void AddShip(List <Point> pieces) { var shipPieces = pieces.Select(p => new ShipPiece() { PosX = p.X, PosY = p.Y, IsHit = false }); var newShip = new Ship() { PlayerId = _currentPlayer, ShipPieces = shipPieces.ToList() }; _shipRepo.SaveShip(newShip); }