Ejemplo n.º 1
0
        public static void ForceStart(Message msg, string[] args)
        {
            SixNimmt game = Bot.GetGameByChatId(msg.Chat.Id);

            if (game == null)
            {
                return;
            }
            else
            {
                game.HandleMessage(msg);
            }
        }
Ejemplo n.º 2
0
        public static void RemoveVirtualPlayer(Message msg, string[] args)
        {
            SixNimmt game = Bot.GetGameByChatId(msg.Chat.Id);

            if (game == null)
            {
                return;
            }
            else
            {
                game.HandleMessage(msg);
            }
        }
Ejemplo n.º 3
0
        public static void KillGame(Message msg, string[] args)
        {
            SixNimmt game = Bot.GetGameByChatId(msg.Chat.Id);

            if (game == null)
            {
                return;
            }
            else
            {
                game.HandleMessage(msg);
                // Bot.RemoveGame(game);
                game.Dispose();
                game = null;
            }
        }
Ejemplo n.º 4
0
        public static void StartGame(Message msg, string[] args)
        {
            SixNimmt game = Bot.GetGameByChatId(msg.Chat.Id);

            if (game == null)
            {
                if (Program.MaintMode)
                {
                    Bot.Send(msg.Chat.Id, GetTranslation("CantStartGameMaintenance", GetLanguage(msg.Chat.Id)));
                    return;
                }


                Bot.AddGame(new SixNimmt(msg.Chat.Id, msg.From, msg.Chat.Title, msg.Chat.Username));
            }
            else
            {
                game.HandleMessage(msg);
                // msg.Reply(GetTranslation("ExistingGame", GetLanguage(msg.Chat.Id)));
            }
        }