feat: enhance image import and solvability calculation (v1.13.0)
All checks were successful
Deploy to Production / deploy (push) Successful in 18s
All checks were successful
Deploy to Production / deploy (push) Successful in 18s
- Implement non-linear threshold slider (histogram percentile method) - Add real-time solvability calculation with progress indicator - Improve solvability logic with generative lookahead (smash) - Update ImageImportModal UI (alpha preview, grid size 5-80) - Add missing translations and difficulty labels - Optimize web worker pool with queue clearing and progress reporting - Fix mobile camera support and UI layout
This commit is contained in:
@@ -27,19 +27,20 @@ export function validateLine(line, targetHints) {
|
||||
export function calculateHints(grid) {
|
||||
if (!grid || grid.length === 0) return { rowHints: [], colHints: [] };
|
||||
|
||||
const size = grid.length;
|
||||
const rows = grid.length;
|
||||
const cols = grid[0].length;
|
||||
const rowHints = [];
|
||||
const colHints = [];
|
||||
|
||||
// Row Hints
|
||||
for (let r = 0; r < size; r++) {
|
||||
for (let r = 0; r < rows; r++) {
|
||||
rowHints.push(calculateLineHints(grid[r]));
|
||||
}
|
||||
|
||||
// Col Hints
|
||||
for (let c = 0; c < size; c++) {
|
||||
for (let c = 0; c < cols; c++) {
|
||||
const col = [];
|
||||
for (let r = 0; r < size; r++) {
|
||||
for (let r = 0; r < rows; r++) {
|
||||
col.push(grid[r][c]);
|
||||
}
|
||||
colHints.push(calculateLineHints(col));
|
||||
|
||||
Reference in New Issue
Block a user