squash a bunch of commits
This commit is contained in:
13
Shogi.Contracts/Socket/CreateGame.cs
Normal file
13
Shogi.Contracts/Socket/CreateGame.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Shogi.Contracts.Types;
|
||||
|
||||
namespace Shogi.Contracts.Socket;
|
||||
|
||||
public class SessionCreatedSocketMessage : ISocketResponse
|
||||
{
|
||||
public SocketAction Action { get; }
|
||||
|
||||
public SessionCreatedSocketMessage()
|
||||
{
|
||||
Action = SocketAction.SessionCreated;
|
||||
}
|
||||
}
|
||||
9
Shogi.Contracts/Socket/ISocketRequest.cs
Normal file
9
Shogi.Contracts/Socket/ISocketRequest.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Shogi.Contracts.Types;
|
||||
|
||||
namespace Shogi.Contracts.Socket
|
||||
{
|
||||
public interface ISocketRequest
|
||||
{
|
||||
SocketAction Action { get; }
|
||||
}
|
||||
}
|
||||
13
Shogi.Contracts/Socket/ISocketResponse.cs
Normal file
13
Shogi.Contracts/Socket/ISocketResponse.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Shogi.Contracts.Types;
|
||||
|
||||
namespace Shogi.Contracts.Socket;
|
||||
|
||||
public interface ISocketResponse
|
||||
{
|
||||
SocketAction Action { get; }
|
||||
}
|
||||
|
||||
public class SocketResponse : ISocketResponse
|
||||
{
|
||||
public SocketAction Action { get; set; }
|
||||
}
|
||||
18
Shogi.Contracts/Socket/Move.cs
Normal file
18
Shogi.Contracts/Socket/Move.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Shogi.Contracts.Types;
|
||||
|
||||
namespace Shogi.Contracts.Socket;
|
||||
|
||||
public class MoveResponse : ISocketResponse
|
||||
{
|
||||
public SocketAction Action { get; }
|
||||
public string SessionName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// The player that made the move.
|
||||
/// </summary>
|
||||
public string PlayerName { get; set; } = string.Empty;
|
||||
|
||||
public MoveResponse()
|
||||
{
|
||||
Action = SocketAction.PieceMoved;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user