add crossword class to represent a crossword puzzle
add cw_csp class to represent a constraint satisfaction problem for a crossword
Details
defined common variable and constraint structs for a constraint satisfaction problem
crossword can be initialized with or without initial contents; if without, the entire puzzle is assumed to be wildcards
cw_csp initializations a crossword upon its own initialization and builds the constraint satisfaction problem (it currently does not reduce it at all)
both crossword and cw_csp are implemented following RAII
crossword puzzle contents are mutable but should only be changed by the cw_csp that owns it to fill in a wildcard with a letter; if the crossword for a cw_csp is changed, the cw_csp will otherwise not update
Testing
add directed test suite for crossword initialization with and without initial contents
add directed test suite for cw_csp initialization with and without initial crossword contents
as referenced in #1 , updated string_sets_equal() to be templated as set_contents_equal<T>()
add map_to_set_contents_equal<T>() for testing
Notes
AC-3 algorithm will be added to cw_csp in the next PR
restructured test directory to have one universal test flow; individual feature tests can be targeted using Catch2 tagging
word_finder still may need to be updated to use RAII in the future
Overview
crossword
class to represent a crossword puzzlecw_csp
class to represent a constraint satisfaction problem for a crosswordDetails
crossword
can be initialized with or without initial contents; if without, the entire puzzle is assumed to be wildcardscw_csp
initializations acrossword
upon its own initialization and builds the constraint satisfaction problem (it currently does not reduce it at all)crossword
andcw_csp
are implemented following RAIIcrossword
puzzle contents are mutable but should only be changed by thecw_csp
that owns it to fill in a wildcard with a letter; if the crossword for a cw_csp is changed, the cw_csp will otherwise not updateTesting
crossword
initialization with and without initial contentscw_csp
initialization with and without initial crossword contentsstring_sets_equal()
to be templated asset_contents_equal<T>()
map_to_set_contents_equal<T>()
for testingNotes
cw_csp
in the next PRword_finder
still may need to be updated to use RAII in the future