checkpoint
This commit is contained in:
26
Shogi.Domain/SessionMetadata.cs
Normal file
26
Shogi.Domain/SessionMetadata.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user