before deleting Rules
This commit is contained in:
@@ -6,13 +6,13 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
public class CreateGameRequest : IRequest
|
||||
{
|
||||
public ClientAction Action { get; set; }
|
||||
public string GameName { get; set; }
|
||||
public string GameName { get; set; } = string.Empty;
|
||||
public bool IsPrivate { get; set; }
|
||||
}
|
||||
|
||||
public class CreateGameResponse : IResponse
|
||||
{
|
||||
public string Action { get; private set; }
|
||||
public string Action { get; }
|
||||
public string Error { get; set; }
|
||||
public Game Game { get; set; }
|
||||
public string PlayerName { get; set; }
|
||||
@@ -20,6 +20,9 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
public CreateGameResponse(ClientAction action)
|
||||
{
|
||||
Action = action.ToString();
|
||||
Error = string.Empty;
|
||||
Game = new Game();
|
||||
PlayerName = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Interfaces;
|
||||
using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
{
|
||||
public class ErrorResponse : IResponse
|
||||
{
|
||||
public string Action { get; private set; }
|
||||
public string Error { get; set; }
|
||||
|
||||
public ErrorResponse(ClientAction action)
|
||||
{
|
||||
Action = action.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Interfaces;
|
||||
using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
{
|
||||
public class JoinByCode : IRequest
|
||||
{
|
||||
public ClientAction Action { get; set; }
|
||||
public string JoinCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,12 @@ using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
{
|
||||
public class JoinByCodeRequest : IRequest
|
||||
{
|
||||
public ClientAction Action { get; set; }
|
||||
public string JoinCode { get; set; }
|
||||
}
|
||||
|
||||
public class JoinGameRequest : IRequest
|
||||
{
|
||||
public ClientAction Action { get; set; }
|
||||
@@ -11,7 +17,7 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
|
||||
public class JoinGameResponse : IResponse
|
||||
{
|
||||
public string Action { get; private set; }
|
||||
public string Action { get; }
|
||||
public string Error { get; set; }
|
||||
public string GameName { get; set; }
|
||||
public string PlayerName { get; set; }
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
|
||||
public class ListGamesResponse : IResponse
|
||||
{
|
||||
public string Action { get; private set; }
|
||||
public string Action { get; }
|
||||
public string Error { get; set; }
|
||||
public ICollection<Game> Games { get; set; }
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Interfaces;
|
||||
using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
{
|
||||
@@ -12,7 +11,7 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
|
||||
public class LoadGameResponse : IResponse
|
||||
{
|
||||
public string Action { get; private set; }
|
||||
public string Action { get; }
|
||||
public Game Game { get; set; }
|
||||
public BoardState BoardState { get; set; }
|
||||
public string Error { get; set; }
|
||||
|
||||
@@ -6,8 +6,8 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
public class MoveRequest : IRequest
|
||||
{
|
||||
public ClientAction Action { get; set; }
|
||||
public string GameName { get; set; }
|
||||
public Move Move { get; set; }
|
||||
public string GameName { get; set; } = string.Empty;
|
||||
public Move Move { get; set; } = new Move();
|
||||
}
|
||||
|
||||
public class MoveResponse : IResponse
|
||||
@@ -21,6 +21,10 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
public MoveResponse(ClientAction action)
|
||||
{
|
||||
Action = action.ToString();
|
||||
Error = string.Empty;
|
||||
GameName = string.Empty;
|
||||
BoardState = new BoardState();
|
||||
PlayerName = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user