Shuffled() 공개 메소드

public Shuffled ( byte player, int group, int card, short pos ) : void
player byte
group int
card int
pos short
리턴 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);
 }