checkpoint

This commit is contained in:
2021-11-10 18:46:29 -06:00
parent 2a3b7b32b4
commit 20f44c8b90
26 changed files with 519 additions and 407 deletions

View File

@@ -2,18 +2,16 @@
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Api
{
public class GetGuestToken
{
}
public class GetGuestTokenResponse
{
public string PlayerName { get; }
public string UserId { get; }
public string DisplayName { get; }
public Guid OneTimeToken { get; }
public GetGuestTokenResponse(string playerName, Guid token)
public GetGuestTokenResponse(string id, string displayName, Guid token)
{
PlayerName = playerName;
UserId = id;
DisplayName = displayName;
OneTimeToken = token;
}
}

View File

@@ -1,13 +1,9 @@
using Gameboard.ShogiUI.Sockets.ServiceModels.Types;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Api
{
public class GetGameResponse
public class GetSessionResponse
{
public Game Game { get; set; }
public WhichPlayer PlayerPerspective { get; set; }

View File

@@ -0,0 +1,11 @@
using Gameboard.ShogiUI.Sockets.ServiceModels.Types;
using System.Collections.ObjectModel;
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Api
{
public class GetSessionsResponse
{
public Collection<Game> PlayerHasJoinedSessions { get; set; }
public Collection<Game> AllOtherSessions { get; set; }
}
}

View File

@@ -17,14 +17,15 @@ namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket
public class JoinGameResponse : IResponse
{
public string Action { get; protected set; }
public string Error { get; set; }
public string GameName { get; set; }
/// <summary>
/// The player who joined the game.
/// </summary>
public string PlayerName { get; set; }
public JoinGameResponse()
{
Action = ClientAction.JoinGame.ToString();
Error = "";
GameName = "";
PlayerName = "";
}

View File

@@ -1,15 +1,16 @@
using Gameboard.ShogiUI.Sockets.ServiceModels.Types;
using System.Collections.Generic;
using Gameboard.ShogiUI.Sockets.ServiceModels.Api;
using Gameboard.ShogiUI.Sockets.ServiceModels.Types;
namespace Gameboard.ShogiUI.Sockets.ServiceModels.Socket
{
public class MoveResponse : IResponse
{
public string Action { get; protected set; }
public Game Game { get; set; }
public WhichPlayer PlayerPerspective { get; set; }
public BoardState BoardState { get; set; }
public IList<Move> MoveHistory { get; set; }
public string Action { get; }
public string GameName { get; set; }
/// <summary>
/// The player that made the move.
/// </summary>
public string PlayerName { get; set; }
public MoveResponse()
{