private void CreateControlsForConfiguration()
        {
            int groupBoxWidth    = CreateControlClass.GetMainFormWidth(_mainForm, _marginHeight);
            int horizontalAmount = CreateControlClass.GetHorizontalAmount(groupBoxWidth, _pictureBoxWidth + _marginWidth);
            int verticalAmount   = 0;

            var groupedHeroRoleList = _heroes.GroupBy(u => u.Role).Select(grp => grp.ToList()).ToList();

            Control newControl = new Control()
            {
                Location = new Point(0, 0),
                Size     = new Size(5, 5)
            };

            Control heroesGroupBox = newControl;

            foreach (var groupRole in groupedHeroRoleList)
            {
                verticalAmount = (int)Math.Ceiling((double)groupRole.Count / (double)horizontalAmount);
                Hero hero = groupRole[0];
                heroesGroupBox           = CreateGroupBoxControl(heroesGroupBox, _mainForm, hero.Role.ToString(), $"Wybór bohaterów dla: {hero.Role.ToString()}", verticalAmount);
                heroesGroupBox.ForeColor = CreateControlClass.GetColorForRole(hero.Role);
                _mainForm.Controls.Add(heroesGroupBox);
                CreateHeroControl(heroesGroupBox, horizontalAmount, groupRole, true);
            }
        }
        private void CreateControls()
        {
            int groupBoxWidth    = CreateControlClass.GetMainFormWidth(_mainForm, _marginHeight);
            int horizontalAmount = CreateControlClass.GetHorizontalAmount(groupBoxWidth, _pictureBoxWidth + _marginWidth);
            int verticalAmount   = (int)Math.Ceiling((double)_maps.Count / (double)horizontalAmount);

            Control mapsGroupBox = CreateGroupBoxControl(_lastGroupBox, _mainForm, _groupBoxMapsName, "Wybór mapy", verticalAmount);

            _mainForm.Controls.Add(mapsGroupBox);
            CreateMapControl(mapsGroupBox, horizontalAmount);

            var     groupedHeroRoleList = _heroes.GroupBy(u => u.Role).Select(grp => grp.ToList()).ToList();
            Control heroesGroupBox      = mapsGroupBox;

            foreach (var groupRole in groupedHeroRoleList)
            {
                verticalAmount = (int)Math.Ceiling((double)groupRole.Count / (double)horizontalAmount);
                Hero hero = groupRole[0];
                heroesGroupBox           = CreateGroupBoxControl(heroesGroupBox, _mainForm, hero.Role.ToString(), $"Wybór bohaterów dla: {hero.Role.ToString()}", verticalAmount);
                heroesGroupBox.ForeColor = CreateControlClass.GetColorForRole(hero.Role);
                _mainForm.Controls.Add(heroesGroupBox);
                CreateHeroControl(heroesGroupBox, horizontalAmount, groupRole, false);
            }
        }