internal void UpdateGame(Game game) { game.BlackPlayerId = this.BlackPlayerId; game.WhitePlayerId = this.WhitePlayerId; game.UserIdInTurn = this.UserIdInTurn; game.GameStatus.StatusName = this.Status; }
public static GameModel ConvertToModel(Game game) { return new GameModel() { Id = game.Id, WhitePlayerId = game.WhitePlayerId, BlackPlayerId = game.BlackPlayerId, UserIdInTurn = game.UserIdInTurn, Status = game.GameStatus.StatusName, Name = game.Name }; }
protected void SendMessage(string text, User toUser, Game game, MessagesType msgType) { game.Messages.Add(new Message() { UserId = toUser.Id, MessagesType = msgType, IsMsgRead = false, Text = text }); }