Added rules for diagonals.