Exemplo n.º 1
0
        public List <TileSet> GetPreviousTileSets()//타일의 모든 조합을 가져옴
        {
            List <Tile>    Set      = new List <Tile>();
            List <TileSet> totalSet = new List <TileSet>();

            for (int i = 0; i < PreviousTable.GetLength(0); i++)
            {
                for (int j = 0; j < PreviousTable.GetLength(1); j++)
                {
                    if (PreviousTable[i, j] != null)
                    {
                        Set.Add(PreviousTable[i, j]);
                    }
                    else
                    {
                        if (Set.Count() != 0)
                        {
                            totalSet.Add(new TileSet(Set));
                            Set = new List <Tile>();
                        }
                    }
                }
            }
            return(totalSet);
        }
Exemplo n.º 2
0
 public void Rollback()//rollback 버튼 클릭시
 {
     Table = (Tile [, ])PreviousTable.Clone();
     CurrentPlayer.HoldingTiles = PreviousHoldingTiles;
 }