We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 296cb45 commit 61a54aeCopy full SHA for 61a54ae
1 file changed
src/Codebreaker.ViewModels/Models/Game.cs
@@ -38,7 +38,7 @@ public partial class Game(
38
/// Gets the end time of the game or null if it did not end yet. This value is set from a game guess anylzer after the game was ended.
39
/// </summary>
40
[ObservableProperty]
41
- private string? _endTime;
+ [NotifyPropertyChangedFor(nameof(IsFinished))]
42
private DateTime? _endTime;
43
44
/// <summary>
@@ -57,6 +57,11 @@ public partial class Game(
57
58
public int MaxMoves { get; private set; } = maxMoves;
59
60
+ /// <summary>
61
+ /// Gets a boolean value indicating if the game is finished.
62
+ /// </summary>
63
+ public bool IsFinished => EndTime is not null;
64
+
65
66
/// Did the player win the game?
67
0 commit comments