Method

IpuzAcrosticfix_quote

Declaration [src]

void
ipuz_acrostic_fix_quote (
  IpuzAcrostic* self,
  IpuzAcrosticSyncDirection sync_direction
)

Description [src]

Makes sure that grid and quote string are in sync.

This will either generate a new quote string based on the grid, or generate a new grid based on the quote string depending on the sync_direction.

When syncing from string to grid, only characters that exist in IpuzPuzzle:charset are considered. Every other run of unrecognized characters will be consensed to a single block.

As an example:

acrostic = ipuz_acrostic_new ();
ipuz_acrostic_set_quote (acrostic,
   "They were careless people, Tom and Daisy- they smashed "
   "up things and creatures and then retreated back into "
   "their money or their vast carelessness or whatever it "
   "was that kept them together, and let other people clean"
   "up the mess they had made");
ipuz_acrostic_fix_quote (acrostic, IPUZ_ACROSTIC_SYNC_STRING_TO_PUZZLE);

Will create the following grid:

Generated grid

Parameters

sync_direction

Type: IpuzAcrosticSyncDirection

Direction to sync the quote.