20 lines
580 B
C
20 lines
580 B
C
|
// It's possible to convert the puzzle to a terse string, and to display the
|
||
|
// puzzle with newlines between its rows for the person viewing.
|
||
|
//
|
||
|
// This functionality depends on stdio.h, which is gross, so I broke it out.
|
||
|
|
||
|
#ifndef PUZZLE_IO_H
|
||
|
#define PUZZLE_IO_H
|
||
|
|
||
|
#include "puzzle.h"
|
||
|
|
||
|
// Initialize a puzzle from an 81-character string containing its contents.
|
||
|
//
|
||
|
// (The characters are read from left to right, top to bottom.)
|
||
|
void puzzle_init_string(puzzle_t* puzzle, const char* text);
|
||
|
|
||
|
// Display a puzzle, writing it to stdout.
|
||
|
void puzzle_display(puzzle_t* puzzle);
|
||
|
|
||
|
#endif
|