Introduce a new XWClue structure that represents individual clues in the Crossword puzzle. They are created when a Crossword is loaded. Each Clue holds the indices of its boxes in the main Crossword array. The Crossword class keeps track of the solution and handles all modifications to it.
The main advantage is that across and down clues are treated the same when getting/setting squares in the puzzle (get_fill, set_fill, would_conflict). And because the XWClue objects are small immutable namedtuples, they can be used as dictionary keys when it's convenient.
Introduce a new XWClue structure that represents individual clues in the Crossword puzzle. They are created when a Crossword is loaded. Each Clue holds the indices of its boxes in the main Crossword array. The Crossword class keeps track of the solution and handles all modifications to it.
The main advantage is that across and down clues are treated the same when getting/setting squares in the puzzle (
get_fill
,set_fill
,would_conflict
). And because the XWClue objects are small immutable namedtuples, they can be used as dictionary keys when it's convenient.