public static void StartGame(string gameID, string userID) { var action = new Models.Game.GameAction() { UserID = userID, GameID = gameID, Type = Models.Game.GAME_ACTIONS.START }; var content = new SocketAction { Route = "game.patch.action", Payload = action }; WebSocket.Instance.Emit("action", content); }
public static void RequestHint(string gameID, string userID, string roundID) { var action = new Models.Game.GameAction() { UserID = userID, GameID = gameID, Type = Models.Game.GAME_ACTIONS.REQUEST_HINT, RoundID = roundID }; var content = new SocketAction { Route = "", Payload = action }; WebSocket.Instance.Emit("Action", content); }
public static void GuessWord(string userID, string gameID, string roundID, string word) { var action = new Models.Game.GameAction() { UserID = userID, GameID = gameID, Type = Models.Game.GAME_ACTIONS.GUESS_WORD, RoundID = roundID, Payload = new Models.Game.ActionWordGuess() { Word = word } }; var content = new SocketAction { Route = "game.patch.action", Payload = action }; WebSocket.Instance.Emit("action", content); }