public static ServerToClientMessage PiecePromotedMessage(PiecePromotion promotion) { ServerToClientMessage message = new ServerToClientMessage(ServerToClientMessageType.PiecePromoted); message.Promotion = promotion; return message; }
public static ServerToClientMessage PieceMovedMessage(PieceMove move) { ServerToClientMessage message = new ServerToClientMessage(ServerToClientMessageType.PieceMoved); message.Move = move; return message; }
public static ServerToClientMessage NewTurnMessage(NewTurn newTurn) { ServerToClientMessage message = new ServerToClientMessage(ServerToClientMessageType.NewTurn); message.NewTurn = newTurn; return message; }
public static ServerToClientMessage GameStartedMessage(GameStart gameStart) { ServerToClientMessage message = new ServerToClientMessage(ServerToClientMessageType.GameStarted); message.GameStart = gameStart; return message; }
public static ServerToClientMessage GameEndedMessage(GameOutcome outcome) { ServerToClientMessage message = new ServerToClientMessage(ServerToClientMessageType.GameEnded); message.Outcome = outcome; return message; }
public static ServerToClientMessage ErrorMessage(Error error) { ServerToClientMessage message = new ServerToClientMessage(ServerToClientMessageType.Error); message.Error = error; return message; }