CHAPTER 8

image

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.

pointing_line()

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  - http://zambon.com.au/ * */#include <stdio.h>#include <stdlib.h> ...

Get Sudoku Programming with C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.