public List<SpaceUnit> ProduceShellsFrom(Spaceship spaceship)
        {
            List<SpaceUnit> producedShells = new List<SpaceUnit>();
            Coordinate shootingPoint = spaceship.GetShootingPoint();
            Coordinate shellSpeed = new Coordinate();
            string shellCollisionGroup = spaceship.CollisionGroupString == "player" ? "player" : "enemy";
            int shellsCount = 1;

            switch (spaceship.Type)
            {
                case SpaceUnitType.Banshee:
                    shellSpeed.Col = 5;
                    break;
                case SpaceUnitType.Battlecruiser:
                case SpaceUnitType.Carrier:
                case SpaceUnitType.Scout:
                case SpaceUnitType.Walkir:
                    shellSpeed.Row = 0;
                    shellSpeed.Col = spaceship.Speed.Col * 2;
                    break;
                case SpaceUnitType.Stealth:
                    shellSpeed.Row -= spaceship.Speed.Col * 2;
                    shellSpeed.Col = 0;
                    break;
                case SpaceUnitType.Dragoon:
                    shellSpeed.Row += spaceship.Speed.Col * 2;
                    shellSpeed.Col = -1;
                    shellsCount = 3;
                    break;
            }

            for (int shell = 0; shell < shellsCount; shell++)
            {
                producedShells.Add(this.ProduceSpaceUnit(SpaceUnitType.Shell, shootingPoint, shellSpeed, shellCollisionGroup));

                shellSpeed.Col++;
            }

            return producedShells;
        }
 public Player(Spaceship spaceship)
 {
     this.Spaceship = spaceship;
     this.Score = InitSore;
 }
        public List<SpaceUnit> ProduceExplosionFrom(Spaceship spaceship)
        {
            int particlesCount = 6;
            List<SpaceUnit> producedParticles = new List<SpaceUnit>(particlesCount);
            string explosionCollisionGroup = spaceship.CollisionGroupString == "player" ? "player" : "enemy";

            int explosionPositionRow = spaceship.TopLeftPosition.Row + spaceship.BodyHeight / 2;
            int explosionPositionCol = spaceship.TopLeftPosition.Col + spaceship.BodyWidth / 2;

            int currentParticleSpeedRow = -1;
            int currentParticleSpeedCol = -1;

            SpaceParticle currentParticle;
            Coordinate currentParticleSpeed;

            for (int particle = 0; particle < particlesCount / 2; particle++)
            {
                currentParticleSpeed = new Coordinate(currentParticleSpeedRow, currentParticleSpeedCol);
                currentParticle = new SpaceParticle(new Coordinate(explosionPositionRow, explosionPositionCol), currentParticleSpeed, explosionCollisionGroup, ConsoleUI.SpaceParticleBody);

                producedParticles.Add(currentParticle);

                currentParticleSpeedCol++;
            }

            currentParticleSpeedRow = 1;
            currentParticleSpeedCol = 1;

            for (int particle = 0; particle < particlesCount / 2; particle++)
            {
                currentParticleSpeed = new Coordinate(currentParticleSpeedRow, currentParticleSpeedCol);
                currentParticle = new SpaceParticle(new Coordinate(explosionPositionRow, explosionPositionCol), currentParticleSpeed, explosionCollisionGroup, ConsoleUI.SpaceParticleBody);

                producedParticles.Add(currentParticle);

                currentParticleSpeedCol--;
            }

            return producedParticles;
        }