Esempio n. 1
0
        public override bool Call(m_rulepossibility rulepos)
        {
            List<m_rulepossibility> ins = rulepos.Rule.Execute(m_players, rulepos.Player);
            if (ins.Count > 0)
            {
                for (int i = 0; i < ins.Count; i++)
                {
                    if (ins[i].Group.Equal(rulepos.Group))
                    {
                        for (int j = 0; j < ins[i].Group.Count; j++)
                            rulepos.Player.RemoveHand(ins[i].Group[j]);

                        Tile rejtile = GetRejectTile();
                        if (rejtile != null)
                            ins[i].Group.Add(rejtile);
                        rulepos.Player.AddExposed(ins[i].Group);
                        m_current = rulepos.Player;
                        if (rejtile != null)
                        {
                            GetRejectPlayer().AddRejected(null);
                            ChangeTileStatus(rejtile, TilePosition.Cemetery);
                        }
                        m_mutextaken = true;

                        return true;
                    }
                }
            }

            return false;
        }
Esempio n. 2
0
 public abstract bool Call(m_rulepossibility rulepos);
Esempio n. 3
0
 public bool Equal(m_rulepossibility tmp)
 {
     if (Player != tmp.Player)
         return false;
     if (Rule != tmp.Rule)
         return false;
     if (Group.Equal(tmp.Group) == false)
         return false;
     return true;
 }