Files
Shogi/Shogi.Domain/SessionMetadata.cs
2022-06-12 12:37:32 -05:00

27 lines
564 B
C#

namespace Shogi.Domain
{
/// <summary>
/// A representation of a Session without the board and game-rules.
/// </summary>
public class SessionMetadata
{
public string Name { get; }
public string Player1 { get; }
public string? Player2 { get; private set; }
public bool IsPrivate { get; }
public SessionMetadata(string name, bool isPrivate, string player1, string? player2 = null)
{
Name = name;
IsPrivate = isPrivate;
Player1 = player1;
Player2 = player2;
}
public void SetPlayer2(string user)
{
Player2 = user;
}
}
}