GSoC Update: P̶l̶a̶y̶A̶n̶s̶w̶e̶r ClueGrid (almost done)

Tanmay
1 min readJul 15, 2023

This will be a short one but it took significant time to get things done right.

Renaming PlayAnswer to ClueGrid

I made an initial change by renaming “PlayAnswer” to “ClueGrid” since we utilize a similar grid in the crossword editor and it sounds more appropriate. The “EditClueDetails” widget specifically uses a similar grid.

Mapping ClueGrid cell selection onto the MainGrid

Now it took a significant amount of time to do this task because I was relatively new to g_signals. Let me explain how it works:

When we perform an action on the puzzle, this is how the update flows and finally, the state is pushed onto the PuzzleStack:

  • play_xword_update_state gets called after an action is performed
  • Then, play_clue_list_update
  • Next, we execute play_clue_row_update
  • Finally, we perform clue_grid_update

So when we do a CLUE_CELL_SELECT on the ClueGrid, we would catch and emit the signal in a similar manner but in reverse order.

To achieve this, we maintain acells_map that maps each index on the ClueGrid to the corresponding cell on the main grid.

Related Merge Requests:

  • Mapping ClueGrid cell selection onto the MainGrid !114

Next, my plan is to add a GUESS_AT_CLUE_CELLsignal and focus on switching navigation based on the “focus”.

Thanks for reading!

--

--