Exemplo n.º 1
0
        public void SetController(int id, int player)
        {
            Card   c          = Card.Find(id);
            Player p          = Player.Find((byte)player);
            Player controller = c.Controller;

            if (p == Player.LocalPlayer)
            {
                if (c.Controller == Player.LocalPlayer)
                {
                    return;
                }
                QueueAction(() => c.TakeControl());
            }
            else
            {
                if (c.Controller != Player.LocalPlayer)
                {
                    return;
                }
                QueueAction(() => c.PassControlTo(p));
            }
        }