Esempio n. 1
0
        private bool HaveTile(PlayerData p, Tile.Family f, int pos)
        {
            Group g = p.GetHand();

            for (int i = 0; i < g.Count; i++)
            {
                if ((g[i].GetFamily() == f) && (g[i].GetNumber() == pos))
                    return true;
            }
            return false;
        }
Esempio n. 2
0
        private Tile GetTile(PlayerData p, Tile.Family f, int pos)
        {
            Group g = p.GetHand();

            for (int i = 0; i < g.Count; i++)
            {
                if ((g[i].GetFamily() == f) && (g[i].GetNumber() == pos))
                    return g[i];
            }
            return null;
        }
Esempio n. 3
0
 public bool AddRejected(Tile add)
 {
     m_rejected = add;
     return true;
 }
Esempio n. 4
0
 public void Reset()
 {
     m_hand = new Group();
     m_cemetery = new Group();
     m_exposed = new Group();
     m_rejected = null;
 }
Esempio n. 5
0
 public bool AddExposed(Tile add)
 {
     m_exposed.Add(add);
     return true;
 }
Esempio n. 6
0
 public bool AddHand(Tile add)
 {
     m_hand.Add(add);
     return true;
 }
Esempio n. 7
0
 public bool AddCemetery(Tile add)
 {
     m_cemetery.Add(add);
     return true;
 }
Esempio n. 8
0
 protected TilePosition GetTilePosition(Tile t)
 {
     for (int i = 0; i < m_tiles.Count; i++)
         if (m_tiles[i].Tile == t)
             return m_tiles[i].Position;
     return TilePosition.Cemetery;
 }
Esempio n. 9
0
 protected bool ChangeTileStatus(Tile t, TilePosition tp)
 {
     for (int i = 0; i < m_tiles.Count; i++)
     {
         if (m_tiles[i].Tile == t)
         {
             m_stile tmp = m_tiles[i];
             tmp.Position = tp;
             m_tiles[i] = tmp;
             return true;
         }
     }
     return false;
 }
Esempio n. 10
0
        public bool Rejected(PlayerData p, Tile t)
        {
            if (p != m_current)
                return false;
            if (m_mutextaken == false)
                return false;
            m_mutextaken = false;
            m_current.GetHand().Remove(t);
            GetPreviousPlayer().AddRejected(null);
            m_current.AddRejected(t);
            ChangeTileStatus(t, TilePosition.Rejected);
            m_current = GetNextPlayer();

            return true;
        }
Esempio n. 11
0
 public bool RemoveHand(Tile del)
 {
     return m_hand.Remove(del);
 }