# Hitori rules

Hitori is a game played on a rectangular grid of numbers. The aim is to eliminate cells (by turning them black), so that the following rules are followed,
1. Each row and column may only contain each number once. Note that this does not mean that a row or column has to contain any particular number.
2. You can't have two black cells next to each other. Linked diagonally is fine.
3. All the white squares must be one single connected whole, i.e. from any white starting square, you must be able to reach any other white square by only moving to adjacent white squares. Diagonal moves are not allowed.
A successfully completed Hitori puzzle,
From these rules we can make a few conclusions,
• If you decide a particular square is black, then all the squares next to it must be white (see rule 2).
• If you have decided a particular square is white, then all other squares in the same row/column with the same number must be black.
• If turning a cell black would create two seperate areas of white cells, then that cell must be white.
• In a sequence of three squares with the same number, the one in the middle must be white, to avoid having two black numbers next to each other.
• Similarly, if you have a square between two identical squares, then your original square must be white, as one of the two identical squares must be black.
• If a row contains two identical squares next to each other, then all other squares in that row with the same number must be black. One of the two identical squares must be white, so any other squares in the same row with the same number must be black.
• If you have a set of 2*2 squares with all the same numbers, then two of them must be black, and they must be diagonal from each other. Similarly, two of them must be white. There's only two possibilities for this, it is often worth looking to see if one of the possibilites would cut off another white section of the grid. If this set of 2*2 squares is in the corner, then the square in the corner must be black, otherwise you're going to cut off a white square from the rest of the grid.