예제 #1
0
        private void SendDeckUpdate(string userid)
        {
            MMessageCustomHTML msg  = new MMessageCustomHTML();
            List <PlayingCard> hand = hands[userid];

            PlayingCard.SortDeckByValue(ref hand);
            msg.formatted_body = "Your hand:" + PlayingCard.GetDeckHTML(hand);
            msg.body           = "Your hand:" + string.Join <PlayingCard>(" ", hand);
            user_rooms[userid].SendMessage(msg);
        }
예제 #2
0
        public static void TestCards(string cmd, string sender, MatrixRoom room)
        {
            List <PlayingCard> deck = PlayingCard.GetStandardDeck();

            PlayingCard.ShuffleDeck(ref deck);
            string             cards   = PlayingCard.GetDeckHTML(deck);
            MMessageCustomHTML htmlmsg = new MMessageCustomHTML();

            htmlmsg.formatted_body = cards;
            htmlmsg.body           = string.Join <PlayingCard>(" ", deck);
            room.SendMessage(htmlmsg);
        }