-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from CodebreakerApp/174-gamesummaryclass
Change GameSummary to class
- Loading branch information
Showing
2 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
26 changes: 17 additions & 9 deletions
26
src/services/gameapi/Codebreaker.GameAPIs.Models/GameSummary.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
namespace Codebreaker.GameAPIs.Models; | ||
|
||
public record class GameSummary( | ||
Guid Id, | ||
string GameType, | ||
string PlayerName, | ||
bool IsCompleted, | ||
bool IsVictory, | ||
int NumberMoves, | ||
DateTime StartTime, | ||
TimeSpan Duration) | ||
public class GameSummary( | ||
Guid id, | ||
string gameType, | ||
string playerName, | ||
bool isCompleted, | ||
bool isVictory, | ||
int numberMoves, | ||
DateTime startTime, | ||
TimeSpan duration) | ||
{ | ||
public Guid Id { get; private set; } = id; | ||
public string GameType { get; private set; } = gameType; | ||
public string PlayerName { get; private set; } = playerName; | ||
public bool IsCompleted { get; private set; } = isCompleted; | ||
public bool IsVictory { get; private set; } = isVictory; | ||
public int NumberMoves { get; private set; } = numberMoves; | ||
public DateTime StartTime { get; private set; } = startTime; | ||
public TimeSpan Duration { get; private set; } = duration; | ||
public override string ToString() => $"{Id}:{GameType}, victory: {IsVictory}, duration: {Duration}"; | ||
} |
File renamed without changes.