public static HostedGameSASModel ToHostedGameSasModel( this HostedGameSASRequest request, Uri host) { var ret = new HostedGameSASModel { GameId = request.GameId, GameName = request.GameName, GameVersion = request.GameVersion, HasPassword = request.HasPassword, HostUserName = request.HostUserName, Id = request.Id, Name = request.Name, Password = request.Password, HostUri = host, TwoSidedTable = request.TwoSidedTable }; return(ret); }
public static IHostedGameState ToHostedGameState(this HostedGameSASModel model, EnumHostedGameStatus status = EnumHostedGameStatus.Unknown) { var ret = new HostedGameState { GameId = model.GameId, GameName = model.GameName, GameVersion = model.GameVersion, HasPassword = model.HasPassword, HostUserName = model.HostUserName, Id = model.Id, Name = model.Name, Password = model.Password, HostUri = model.HostUri, Status = status, TwoSidedTable = model.TwoSidedTable, CurrentTurnPlayer = 0, Players = new List <HostedGamePlayer>() }; return(ret); }
public static HostedGameSASModel ToHostedGameSasModel( this HostedGameSASRequest request, Uri host) { var ret = new HostedGameSASModel { GameId = request.GameId, GameName = request.GameName, GameVersion = request.GameVersion, HasPassword = request.HasPassword, HostUserName = request.HostUserName, Id = request.Id, Name = request.Name, Password = request.Password, HostUri = host, TwoSidedTable = request.TwoSidedTable, Spectators = request.Spectators, HostUserIconUrl = request.HostUserIconUrl, GameIconUrl = request.GameIconUrl }; return ret; }