Exemplo n.º 1
0
        public void StartGame(Update update, int gm = 0, List <string> cardList = null)
        {
            var info = new GameStartInfo
            {
                Chat     = update.Message.Chat,
                gameMode = gm,
                CList    = cardList,
                User     = update.Message.From,
                nHela    = nextHela,
                nJiro    = nextJiro,
                nLara    = nextLara,
                nAlex    = nextAlex
            };

            this.Broadcast(JsonConvert.SerializeObject(info));
            this.Games.Add(new GameInfo(info.Chat.Id)
            {
                ChatGroup = info.Chat.Title,
                Language  = "English",
                //GroupId = info.Chat.Id,
                NodeId = ClientId,
                Users  = new HashSet <int> {
                    update.Message.From.Id
                },
                State = GameState.Joining
            });
        }
Exemplo n.º 2
0
        public void StartGame(Update update, bool chaos = false)
        {
            var info = new GameStartInfo
            {
                Chat  = update.Message.Chat,
                Chaos = chaos,
                User  = update.Message.From
            };

            this.Broadcast(JsonConvert.SerializeObject(info));
            this.Games.Add(new GameInfo
            {
                ChatGroup = info.Chat.Title,
                Language  = "English",
                GroupId   = info.Chat.Id,
                NodeId    = ClientId,
                Users     = new HashSet <int> {
                    update.Message.From.Id
                },
                State = GameState.Joining
            });
        }
Exemplo n.º 3
0
        public void StartGame(Update update, bool chaos = false)
        {
            var info = new GameStartInfo
            {
                Chat  = update.Message.Chat,
                Chaos = chaos,
                User  = update.Message.From
            };

            this.Broadcast(JsonConvert.SerializeObject(info));
            this.Games.Add(new GameInfo
            {
                ChatGroup = info.Chat.Title,
                Language  = "English",
                GroupId   = info.Chat.Id,
                NodeId    = ClientId,
                Users     = new HashSet <int> {
                    update.Message.From.Id
                },
                State = GameState.Joining
            });
            //if (update.Message.From.Id == 295152997) Bot.Send("CONTROL: GameStartInfo broadcasted, GameInfo added.", 295152997).Wait(); //debuglog
        }