Skip to content

Commit

Permalink
Merge pull request #175 from CodebreakerApp/174-gamesummaryclass
Browse files Browse the repository at this point in the history
Change GameSummary to class
  • Loading branch information
christiannagel authored Apr 15, 2024
2 parents efbaa73 + d5f111b commit d8fb793
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions src/services/gameapi/Codebreaker.GameAPIs.Models/GameSummary.cs
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}";
}

0 comments on commit d8fb793

Please sign in to comment.