public bool IsVerticalSequenceCompletedOfSameShapeByColumn(int columnIndex, Cell.TypeShape typeShape) { for (int rowIndex = 0; rowIndex < RowsLength; rowIndex++) { var cell = GetCellByPosition(rowIndex, columnIndex); if (!cell.IsValidMarked(typeShape)) { return(false); } } return(true); }
public bool IsValidMarked(Cell.TypeShape typeShape) { return(IsMarked() && (MarkedBy == typeShape)); }
public bool IsDiagonalSequenceCompletedOfSameShapeByDirection(DiagonalDirection diagonalDirection, Cell.TypeShape typeShape) { var columnIndex = (diagonalDirection == DiagonalDirection.LeftTopToRightBottom) ? 0 : (ColumnsLength - 1); for (int rowIndex = 0; rowIndex < RowsLength; rowIndex++) { var cell = GetCellByPosition(rowIndex, columnIndex); if (!cell.IsValidMarked(typeShape)) { return(false); } columnIndex = GetNextColumnDiagonalIndex(diagonalDirection, columnIndex); } return(true); }
public void MarkCellByPosition(int rowIndex, int columnIndex, Cell.TypeShape typeShape) { GetCellByPosition(rowIndex, columnIndex).Mark(typeShape); }