Implementing “Pointing Line”

As I explained in Chapter 2, pointing line is similar to box-line in that they both look at the intersection of a line with a box. Therefore, it is not surprising that the implementations of the two strategies are quite similar.

The general function, pointing_line() (see Listing 8-1), executes pointing_line_box() (see Listing 8-2) for each possible box of the Sudoku.


The function is so simple that I’m going to show it without any further comment.

Listing 8-1. pointing_line.c

/* pointing_line.c * * Copyright (C) 2015  Giulio Zambon  - * */#include <stdio.h>#include <stdlib.h> ...

Get Sudoku Programming with C now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.