Beispiel #1
0
        public IEnumerable <GemBehaviour> CollapseColumns(IEnumerable <GemBehaviour> gems)
        {
            var movingGems = new List <GemBehaviour>();

            var columns = BoardUtils.GetColumns(gems);

            foreach (var column in columns)
            {
                movingGems.AddRange(
                    CollapseColumn(column)
                    );
            }

            return(movingGems);
        }
Beispiel #2
0
 public GemBehaviour GetGem(GridIndex index)
 {
     return(BoardUtils.IsInBounds(index, columns, rows)
                ? allGems[index.GridX, index.GridY]
                : null);
 }