コード例 #1
0
ファイル: Rule.cs プロジェクト: kkawaguchi/osero
        private void ChangeCell(Cell cell, Stone stone, Direction direction)
        {
            Cell next = cell;

            //1つ上に石がある間続ける
            while ((next = next.GetNextCell(direction)) != null && next.HasStone)
            {
                //自分と違う色なら色を変える
                if (stone.Color != next.Stone.Color)
                {
                    next.Change();
                }
                else
                {
                    return;
                }
            }
        }