checkpoint
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
{
|
||||
public string Action { get; private set; }
|
||||
public string Error { get; set; }
|
||||
public IEnumerable<Game> Games { get; set; }
|
||||
public ICollection<Game> Games { get; set; }
|
||||
|
||||
public ListGamesResponse(ClientAction action)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Messages
|
||||
{
|
||||
public string Action { get; private set; }
|
||||
public Game Game { get; set; }
|
||||
public IEnumerable<Move> Moves { get; set; }
|
||||
public IReadOnlyList<Move> Moves { get; set; }
|
||||
public string Error { get; set; }
|
||||
|
||||
public LoadGameResponse(ClientAction action)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types
|
||||
{
|
||||
public class BoardState
|
||||
{
|
||||
public Piece[,] Board { get; set; }
|
||||
public IReadOnlyCollection<Piece> Player1Hand { get; set; }
|
||||
public IReadOnlyCollection<Piece> Player2Hand { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,13 @@
|
||||
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types
|
||||
{
|
||||
public class Game
|
||||
{
|
||||
public string GameName { get; set; }
|
||||
public string[] Players { get; set; }
|
||||
}
|
||||
public class Game
|
||||
{
|
||||
public string GameName { get; set; }
|
||||
/// <summary>
|
||||
/// Players[0] is the session owner, Players[1] is the other guy
|
||||
/// </summary>
|
||||
public IReadOnlyList<string> Players { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types
|
||||
{
|
||||
public class Piece
|
||||
{
|
||||
public WhichPiece WhichPiece { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// True if this piece is controlled by you.
|
||||
/// </summary>
|
||||
public bool IsControlledByMe { get; set; }
|
||||
|
||||
public bool IsPromoted { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types
|
||||
{
|
||||
public enum WhichPiece
|
||||
{
|
||||
King,
|
||||
GoldGeneral,
|
||||
SilverGeneral,
|
||||
Bishop,
|
||||
Rook,
|
||||
Knight,
|
||||
Lance,
|
||||
Pawn
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user