Shuffled() public method

public Shuffled ( byte player, int group, int card, short pos ) : void
player byte
group int
card int
pos short
return void
示例#1
0
文件: Handler.cs 项目: totalgit/OCTGN
 public void Shuffled(int group, int[] card, short[] pos)
 {
     _broadcaster.Shuffled(group, card, pos);
 }
示例#2
0
        //public void Shuffle(int group, int[] card)
        //{
        //    // Special case: solo playing
        //    if (_clients.Count == 1)
        //    {
        //        _clients[_sender].Rpc.Shuffle(group, card);
        //        return;
        //    }
        //    // Normal case
        //    int nCards = card.Length/(_clients.Count - 1);
        //    int from = 0, client = 1;
        //    var someCard = new int[nCards];
        //    foreach (KeyValuePair<TcpClient, PlayerInfo> kvp in _clients.Where(kvp => kvp.Key != _sender))
        //    {
        //        if (client < _clients.Count - 1)
        //        {
        //            if (nCards > 0)
        //            {
        //                Array.Copy(card, @from, someCard, 0, nCards);
        //                kvp.Value.Rpc.Shuffle(@group, someCard);
        //                @from += nCards;
        //            }
        //            client++;
        //        }
        //        else
        //        {
        //            int rest = card.Length - @from;
        //            if (rest > 0)
        //            {
        //                someCard = new int[rest];
        //                Array.Copy(card, @from, someCard, 0, rest);
        //                kvp.Value.Rpc.Shuffle(@group, someCard);
        //            }
        //            return;
        //        }
        //    }
        //}

        public void Shuffled(byte player, int group, int[] card, short[] pos)
        {
            _broadcaster.Shuffled(player, group, card, pos);
        }
示例#3
0
 public void Shuffled(int group, int[] card, short[] pos)
 {
     //_clients[_sender].Rpc.Shuffled(group,card,pos);
     _broadcaster.Shuffled(group, card, pos);
 }