gpoesia/loopye

Fix grid_cell_size and positioning of multiple puzzles in Lesson01ExerciseStepPlayerMulti

Opened this issue · 0 comments

vrod commented

grid_cell_size is currently not optimal when multiple puzzles are used in a lesson step (Lesson01ExerciseStepPlayerMulti).

For instance, when n_cols is too small, a lot of space is left unused (since grid_cell_size is currently computed as stepPlayer.game.gridCellSize() / nPlayers). See step 11 for an example.

On the other hand, when n_cols is too large, there is no distinction about where the grid for the n-th puzzle ends and the n+1-th puzzle begins. See step 13 for an example.

The ideal is to compute grid_cell_size, as well as the elements' positions, in a way that both problems stated above are not present.

Code: src/lesson/lesson01.js