File tree Expand file tree Collapse file tree
CodeBreaker.Blazor.Client/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,13 +122,21 @@ private void SelectField(int index)
122122 for ( int i = 0 ; i < _currentMove . Length ; i ++ )
123123 _currentMove [ i ] . Selected = false ;
124124
125- // Reset the field, if it is already filled
126- if ( _currentMove [ _selectedField ] . Color is not null || _currentMove [ _selectedField ] . Shape is not null )
125+ if ( AvailableShapes is null || ! AvailableShapes . Any ( ) )
127126 {
127+ // Current game only with colors
128+ // Reset the color of the selected field (will be selected in the next step)
129+ _currentMove [ _selectedField ] . Color = null ;
130+ }
131+ else if ( _currentMove [ _selectedField ] . Color is not null && _currentMove [ _selectedField ] . Shape is not null )
132+ {
133+ // Current game with colors and shapes
134+ // Reset the color and shape of the selected field when both are set
128135 _currentMove [ _selectedField ] . Color = null ;
129136 _currentMove [ _selectedField ] . Shape = null ;
130137 }
131138
139+
132140 // Set the selected field to selected
133141 _currentMove [ _selectedField ] . Selected = true ;
134142 _selectable = true ;
Original file line number Diff line number Diff line change 2020 <PackageReference Include =" Microsoft.Identity.Web" Version =" 3.1.0" />
2121 <PackageReference Include =" Microsoft.Identity.Web.UI" Version =" 3.1.0" />
2222 <PackageReference Include =" System.Formats.Asn1" Version =" 8.0.1" />
23- <PackageReference Include =" System.Text.Json" Version =" 8.0.4 " />
23+ <PackageReference Include =" System.Text.Json" Version =" 8.0.5 " />
2424 </ItemGroup >
2525
2626 <ItemGroup >
You can’t perform that action at this time.
0 commit comments