private void GenerateStarShips()
        {
            this.Ships.Clear();

            int numberOfShips = StellarCartographyModel.Random.Next(2, 4);
            int x, y;

            for (int i = 0; i < numberOfShips; i++)
            {
                int index = this.GetUnusedIndex(this.ships.Count, this.lastStarShipIndices, numberOfShips);

                PictureRect ship = this.ships[index];

                do
                {
                    x = StellarCartographyModel.Random.Next(this.GAME_FIELD_COLUMNS);
                    y = StellarCartographyModel.Random.Next(this.GAME_FIELD_ROWS);

                    ship.X = x * this.xRatio;
                    ship.Y = y * this.yRatio;
                } while (this.Planets.Any(p => p.Intersects(ship)) ||
                         this.Ships.Any(s => s.Intersects(ship)) ||
                         this.Star.Intersects(ship) ||
                         this.Stargate.Intersects(ship));

                ship.RandomRotate();
                ship.CalculateOffset(this.xRatio, this.yRatio);
                this.Ships.Add(ship);
            }
        }
        private void GenerateAsteroids()
        {
            int sideBlocked = StellarCartographyModel.Random.Next(4); // 0: NORTH 1: EAST 2: SOUTH 3: WEST

            int x = 0, y = 0;

            for (int j = 0; j < 4; j++)
            {
                int numberOfRoids = j % 2 == 0 ? this.GAME_FIELD_ROWS / 2 : this.GAME_FIELD_COLUMNS / 2;
                int removeIndex   = j == sideBlocked ? -1 : StellarCartographyModel.Random.Next(numberOfRoids);

                for (int i = 0; i < numberOfRoids; i++)
                {
                    switch (j)
                    {
                    case 0:
                        x = this.GAME_FIELD_COLUMNS / 2;
                        y = 0;
                        break;

                    case 1:
                        x = this.GAME_FIELD_COLUMNS / 2 + 1;
                        y = this.GAME_FIELD_ROWS / 2;
                        break;

                    case 2:
                        x = this.GAME_FIELD_COLUMNS / 2;
                        y = this.GAME_FIELD_ROWS / 2 + 1;
                        break;

                    case 3:
                        x = 0;
                        y = this.GAME_FIELD_ROWS / 2;
                        break;
                    }

                    x = j % 2 == 0 ? x : x + i;
                    y = j % 2 == 0 ? y + i : y;

                    PictureRect newRoid = asteroids[1].Clone();
                    newRoid.X = x * this.xRatio;
                    newRoid.Y = y * this.yRatio;

                    if (j % 2 == 0)
                    {
                        newRoid.Rotate();
                    }

                    newRoid.CalculateOffset(this.xRatio, this.yRatio);

                    if (!newRoid.Intersects(this.Star) && i != removeIndex)
                    {
                        this.Planets.Add(newRoid);
                    }
                }
            }
        }
        private void GenerateStar()
        {
            int randomLocation = StellarCartographyModel.Random.Next(3);

            int x = this.GAME_FIELD_COLUMNS / 2;
            int y = this.GAME_FIELD_ROWS / 2 - 1 + randomLocation;

            int index = this.GetUnusedIndex(this.stars.Count, this.lastStarIndices, 2);

            PictureRect selectedStar = this.stars[index];

            selectedStar.X = x * this.xRatio;
            selectedStar.Y = y * this.yRatio;
            selectedStar.CalculateOffset(this.xRatio, this.yRatio);

            this.Star = selectedStar;
        }
        private void GeneratePlanets()
        {
            this.Planets.Clear();

            int x, y;

            for (int i = 0; i < 4; i++)
            {
                x = StellarCartographyModel.Random.Next(this.GAME_FIELD_COLUMNS / 2 - 1);
                y = StellarCartographyModel.Random.Next(this.GAME_FIELD_ROWS / 2 - 1);

                int index = this.GetUnusedIndex(this.planets.Count, this.lastPlanetIndices, 10);

                PictureRect selectedPlanet = this.planets[index];
                selectedPlanet.X = i == 1 || i == 3 ? x + this.GAME_FIELD_COLUMNS / 2 + 1 : x;
                selectedPlanet.Y = i == 2 || i == 3 ? y + this.GAME_FIELD_ROWS / 2 + 1 : y;

                selectedPlanet.X *= this.xRatio;
                selectedPlanet.Y *= this.yRatio;
                selectedPlanet.CalculateOffset(this.xRatio, this.yRatio);

                this.Planets.Add(selectedPlanet);
            }
        }