File tree Expand file tree Collapse file tree
src/CodeBreaker.Blazor.Client/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 }
3636 @if (i == 1 && ! GameFinished )
3737 {
38- <div >
38+ <div class = " selectable-game-buttons " >
3939 <FluentButton Appearance =" Appearance.Stealth" Disabled =" PlayButtonDisabled" OnClick =" SetMoveAsync" >
4040 <FluentIcon Value =" new Icons.Filled.Size48.PlayCircle()" />
4141 </FluentButton >
42+ <FluentButton Appearance =" Appearance.Stealth" Disabled =" ClearButtonDisabled" OnClick =" ResetMove" >
43+ <FluentIcon Value =" new Icons.Filled.Size48.DismissCircle()" />
44+ </FluentButton >
4245 </div >
4346 }
4447 else
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ AvailableColors is not null && field.Color is null
3535 || AvailableShapes is not null && field . Shape is null
3636 ) ;
3737
38+ private bool ClearButtonDisabled => _currentMove . All ( field => field . Color is null && field . Shape is null ) ;
39+
3840 private string KeyPegsFormat => Game . NumberCodes > 4 ? "three-two" : "two-two" ;
3941
4042 private IEnumerable < string > ? AvailableColors => Game ? . FieldValues . GetOrDefault ( "colors" ) ;
@@ -108,6 +110,9 @@ public async Task SetMoveAsync()
108110 }
109111 }
110112
113+ private void ResetMove ( ) =>
114+ InitialzePlayground ( ) ;
115+
111116 #region ClickEvents
112117 private void SelectField ( int index )
113118 {
Original file line number Diff line number Diff line change 111111 transition : background-color .5s ease-in-out;
112112 }
113113
114+ .game-container .game-row .selectable-game-buttons {
115+ width : unset;
116+ margin-left : -5px ;
117+ }
118+
114119 .game-container .game-row div .key-pegs {
115120 width : calc (var (--game-field-width ) - 4px );
116121 height : calc (var (--game-field-height ) - 4px );
You can’t perform that action at this time.
0 commit comments