Example #1
0
        private static bool tryInsertCapturePosition(
            Board i_GameBoard, CheckersPiece i_CurrentChecker,
            ushort i_RowIndex, ushort i_ColIndex,
            CheckersPiece i_RivalChecker, ref Dictionary <string, List <string> > io_CapturePositions)
        {
            bool canInsert = false;

            if (i_RivalChecker != null && isAvailableCaptureCell(i_GameBoard, i_RowIndex, i_ColIndex))
            {
                string captureIndex = MoveUtils.GetStringIndexes(i_RowIndex, i_ColIndex);
                MoveUtils.AddToDict(ref io_CapturePositions, i_CurrentChecker, captureIndex);
                canInsert = true;
            }

            return(canInsert);
        }