Method
IpuzNonogramget_clues
Declaration [src]
GArray*
ipuz_nonogram_get_clues (
IpuzNonogram* self,
guint index,
IpuzClueDirection direction
)
Description [src]
Returns an array containing the run of IpuzNonogramClue
indicated by index
and direction
.
As an example, consider the second row of the example at
IpuzNonogram
:
It will be represented by an array with four
IpuzNonogramClue
structs. The count
of the clues will be
[5, 4, 3, 3]
, and the group
of all four clues will be
IpuzPuzzle:block
.
GArray *row;
IpuzNonogramClue clue_segment;
row = ipuz_nonogram_get_clues (nonogram, 1, IPUZ_CLUE_DIRECTION_ACROSS);
g_assert_cmpint (row->len, ==, 4);
clue_segment = g_array_index (row, IpuzNonogramClue, 2);
g_assert_cmping (clue_segment.index, ==, 3);
g_assert_cmpstr (clue_segment.group, ==,
ipuz_puzzle_get_block (IPUZ_PUZZLE (nonogram)));
Note
This function will return an empty array — and not NULL
— if
the puzzle has no blocks in the indicated row or column.
Parameters
index
-
Type:
guint
Index of the row or column.
direction
-
Type:
IpuzClueDirection
Direction of the clues.
Return value
Type: An array of None
An array containing the run of IpuzNonogramClue
segments.
The data is owned by the instance. |