16 Commits

9 changed files with 354 additions and 184 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "vue-nonograms-solid", "name": "vue-nonograms-solid",
"version": "1.0.5", "version": "1.5.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "vue-nonograms-solid", "name": "vue-nonograms-solid",
"version": "1.0.5", "version": "1.5.0",
"dependencies": { "dependencies": {
"fireworks-js": "^2.10.8", "fireworks-js": "^2.10.8",
"flag-icons": "^7.5.0", "flag-icons": "^7.5.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "vue-nonograms-solid", "name": "vue-nonograms-solid",
"version": "1.0.5", "version": "1.5.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -1,13 +1,15 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref, computed } from 'vue';
import { usePuzzleStore } from '@/stores/puzzle'; import { usePuzzleStore } from '@/stores/puzzle';
import { useI18n } from '@/composables/useI18n'; import { useI18n } from '@/composables/useI18n';
import { calculateDifficulty } from '@/utils/puzzleUtils';
const emit = defineEmits(['close']); const emit = defineEmits(['close']);
const store = usePuzzleStore(); const store = usePuzzleStore();
const { t } = useI18n(); const { t } = useI18n();
const customSize = ref(10); const customSize = ref(10);
const fillRate = ref(50);
const errorMsg = ref(''); const errorMsg = ref('');
const snapToStep = (value, step) => { const snapToStep = (value, step) => {
@@ -19,6 +21,20 @@ const handleSnap = () => {
customSize.value = snapToStep(Number(customSize.value), 5); customSize.value = snapToStep(Number(customSize.value), 5);
}; };
const difficultyLevel = computed(() => {
return calculateDifficulty(fillRate.value / 100);
});
const difficultyColor = computed(() => {
switch(difficultyLevel.value) {
case 'extreme': return '#ff3333';
case 'hardest': return '#ff9933';
case 'harder': return '#ffff33';
case 'easy': return '#33ff33';
default: return '#33ff33';
}
});
const confirm = () => { const confirm = () => {
const size = parseInt(customSize.value); const size = parseInt(customSize.value);
if (isNaN(size) || size < 5 || size > 80) { if (isNaN(size) || size < 5 || size > 80) {
@@ -26,7 +42,7 @@ const confirm = () => {
return; return;
} }
store.initCustomGame(size); store.initCustomGame(size, fillRate.value / 100);
emit('close'); emit('close');
}; };
</script> </script>
@@ -52,6 +68,29 @@ const confirm = () => {
<span>80</span> <span>80</span>
</div> </div>
</div> </div>
<p>{{ t('custom.fillRate') }}</p>
<div class="input-group">
<div class="range-value">{{ fillRate }}%</div>
<input
type="range"
v-model="fillRate"
min="10"
max="90"
step="5"
/>
<div class="range-scale">
<span>10%</span>
<span>90%</span>
</div>
</div>
<div class="difficulty-indicator">
<span class="label">{{ t('custom.difficulty') }}:</span>
<span class="value" :style="{ color: difficultyColor }">
{{ t(`difficulty.${difficultyLevel}`) }}
</span>
</div>
<p v-if="errorMsg" class="error">{{ errorMsg }}</p> <p v-if="errorMsg" class="error">{{ errorMsg }}</p>
@@ -87,6 +126,7 @@ const confirm = () => {
border: 1px solid var(--accent-cyan); border: 1px solid var(--accent-cyan);
box-shadow: 0 0 50px rgba(0, 242, 255, 0.2); box-shadow: 0 0 50px rgba(0, 242, 255, 0.2);
animation: slideUp 0.3s ease; animation: slideUp 0.3s ease;
transition: all 0.3s ease-in-out;
} }
h2 { h2 {
@@ -161,6 +201,31 @@ input[type="range"]::-moz-range-thumb {
font-size: 0.85rem; font-size: 0.85rem;
} }
.difficulty-indicator {
margin: 20px 0;
font-size: 1.2rem;
display: flex;
justify-content: center;
gap: 10px;
align-items: center;
white-space: nowrap;
height: 1.5em; /* Reserve space for one line of text */
}
.difficulty-indicator .label {
color: var(--text-color);
}
.difficulty-indicator .value {
font-weight: bold;
text-transform: uppercase;
text-shadow: 0 0 10px currentColor;
transition: color 0.3s ease;
display: inline-block;
min-width: 120px; /* Reserve space for longest text */
text-align: left;
}
.error { .error {
color: #ff4d4d; color: #ff4d4d;
font-size: 0.9rem; font-size: 0.9rem;

View File

@@ -4,9 +4,8 @@ import { Fireworks } from 'fireworks-js';
import { usePuzzleStore } from '@/stores/puzzle'; import { usePuzzleStore } from '@/stores/puzzle';
import { useI18n } from '@/composables/useI18n'; import { useI18n } from '@/composables/useI18n';
import { useTimer } from '@/composables/useTimer'; import { useTimer } from '@/composables/useTimer';
import xIcon from '@/assets/brands/x.svg'; import { Download } from 'lucide-vue-next';
import facebookIcon from '@/assets/brands/facebook.svg'; import { calculateDifficulty } from '@/utils/puzzleUtils';
import whatsappIcon from '@/assets/brands/whatsapp.svg';
const store = usePuzzleStore(); const store = usePuzzleStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -88,8 +87,9 @@ const buildShareCanvas = () => {
const padding = 28; const padding = 28;
const headerHeight = 64; const headerHeight = 64;
const footerHeight = 28; const footerHeight = 28;
const infoHeight = 40; // New space for difficulty/guide info
const width = boardSize + padding * 2; const width = boardSize + padding * 2;
const height = boardSize + padding * 2 + headerHeight + footerHeight; const height = boardSize + padding * 2 + headerHeight + footerHeight + infoHeight;
const scale = window.devicePixelRatio || 1; const scale = window.devicePixelRatio || 1;
const canvas = document.createElement('canvas'); const canvas = document.createElement('canvas');
canvas.width = width * scale; canvas.width = width * scale;
@@ -109,6 +109,24 @@ const buildShareCanvas = () => {
ctx.fillText(t('app.title'), padding, padding + 10); ctx.fillText(t('app.title'), padding, padding + 10);
ctx.font = '600 16px "Segoe UI", sans-serif'; ctx.font = '600 16px "Segoe UI", sans-serif';
ctx.fillText(`${t('win.time')} ${formattedTime.value}`, padding, padding + 34); ctx.fillText(`${t('win.time')} ${formattedTime.value}`, padding, padding + 34);
// Difficulty & Density Info
const densityPercent = Math.round(store.currentDensity * 100);
const difficultyKey = calculateDifficulty(store.currentDensity);
let diffColor = '#33ff33';
if (difficultyKey === 'extreme') diffColor = '#ff3333';
else if (difficultyKey === 'hardest') diffColor = '#ff9933';
else if (difficultyKey === 'harder') diffColor = '#ffff33';
const difficultyText = t(`difficulty.${difficultyKey}`);
ctx.font = '600 14px "Segoe UI", sans-serif';
// Right aligned difficulty info
const diffLabel = `${t('win.difficulty')} ${difficultyText} (${densityPercent}%)`;
const diffWidth = ctx.measureText(diffLabel).width;
ctx.fillStyle = diffColor;
ctx.fillText(diffLabel, width - padding - diffWidth, padding + 34);
const gridX = padding; const gridX = padding;
const gridY = padding + headerHeight; const gridY = padding + headerHeight;
ctx.fillStyle = 'rgba(255, 255, 255, 0.06)'; ctx.fillStyle = 'rgba(255, 255, 255, 0.06)';
@@ -152,6 +170,19 @@ const buildShareCanvas = () => {
} }
} }
} }
// Guide Usage Info (Dirty Flag)
if (store.guideUsageCount > 0) {
ctx.fillStyle = '#ff4d4d';
ctx.font = '600 14px "Segoe UI", sans-serif';
const totalCells = store.size * store.size;
const percent = Math.min(100, Math.round((store.guideUsageCount / totalCells) * 100));
const guideText = t('win.usedGuide', { count: store.guideUsageCount, percent });
ctx.fillText(`⚠️ ${guideText}`, padding, height - padding - footerHeight + 10);
}
ctx.fillStyle = 'rgba(255, 255, 255, 0.75)'; ctx.fillStyle = 'rgba(255, 255, 255, 0.75)';
ctx.font = '500 14px "Segoe UI", sans-serif'; ctx.font = '500 14px "Segoe UI", sans-serif';
ctx.fillText(appUrl, padding, height - padding + 6); ctx.fillText(appUrl, padding, height - padding + 6);
@@ -183,7 +214,7 @@ const buildShareUrl = (target, text, url) => {
const encodedText = encodeURIComponent(text); const encodedText = encodeURIComponent(text);
const encodedUrl = encodeURIComponent(url); const encodedUrl = encodeURIComponent(url);
if (target === 'x') { if (target === 'x') {
return `https://twitter.com/intent/tweet?text=${encodedText}&url=${encodedUrl}`; return `https://x.com/intent/tweet?text=${encodedText}&url=${encodedUrl}`;
} }
if (target === 'facebook') { if (target === 'facebook') {
return `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}&quote=${encodedText}`; return `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}&quote=${encodedText}`;
@@ -197,29 +228,48 @@ const buildShareUrl = (target, text, url) => {
const shareTo = async (target) => { const shareTo = async (target) => {
if (shareInProgress.value) return; if (shareInProgress.value) return;
shareInProgress.value = true; shareInProgress.value = true;
const text = shareText.value;
const url = window.location.href;
const shareUrl = buildShareUrl(target, text, url);
try { try {
const blob = await createShareBlob(); // Try native share first if available (supports images)
if (!blob) return; if (navigator.share && navigator.canShare) {
const file = new File([blob], `nonogram-${store.size}x${store.size}.png`, { type: 'image/png' }); const blob = await createShareBlob();
const text = shareText.value; if (blob) {
const url = window.location.href; const file = new File([blob], `nonogram-${store.size}x${store.size}.png`, { type: 'image/png' });
if (navigator.share && navigator.canShare && navigator.canShare({ files: [file] })) { if (navigator.canShare({ files: [file] })) {
await navigator.share({ await navigator.share({
files: [file], files: [file],
text, text,
title: t('app.title'), title: t('app.title'),
url url
}); });
return; return;
}
}
} }
await downloadShareImage(); } catch (error) {
const shareUrl = buildShareUrl(target, text, url); if (error.name === 'AbortError') {
if (shareUrl) { return; // User cancelled native share, do nothing
window.open(shareUrl, '_blank', 'noopener');
} }
// Other errors -> fall through to fallback
} finally { } finally {
shareInProgress.value = false; shareInProgress.value = false;
} }
// Fallback: Direct Link + Download
// Open window immediately if possible (though we awaited above, so it might be blocked,
// but we can't do much about it if we want to try native share first).
// Ideally, for Desktop, navigator.share is undefined so we skip the await above.
if (shareUrl) {
window.open(shareUrl, '_blank', 'noopener');
}
// Trigger download as "screenshot support"
downloadShareImage();
}; };
onMounted(() => { onMounted(() => {
@@ -279,19 +329,23 @@ onUnmounted(() => {
<div class="share"> <div class="share">
<div class="share-title">{{ t('win.shareTitle') }}</div> <div class="share-title">{{ t('win.shareTitle') }}</div>
<div class="share-buttons"> <div class="share-buttons">
<!-- X (Twitter) -->
<button class="btn-neon secondary share-btn" :disabled="shareInProgress" :aria-label="t('win.shareX')" @click="shareTo('x')"> <button class="btn-neon secondary share-btn" :disabled="shareInProgress" :aria-label="t('win.shareX')" @click="shareTo('x')">
<img :src="xIcon" alt="" class="share-icon" /> <svg viewBox="0 0 24 24" fill="currentColor" class="share-icon"><path d="M18.901 3H22l-7.21 8.26L23 21h-6.66L11.13 14.76 5.66 21H2.56l7.73-8.83L1 3h6.8l4.63 5.56L18.9 3h.001zm-1.2 15.9h1.77L6.44 5.1H4.44l13.26 13.8z"/></svg>
</button> </button>
<!-- Facebook -->
<button class="btn-neon secondary share-btn" :disabled="shareInProgress" :aria-label="t('win.shareFacebook')" @click="shareTo('facebook')"> <button class="btn-neon secondary share-btn" :disabled="shareInProgress" :aria-label="t('win.shareFacebook')" @click="shareTo('facebook')">
<img :src="facebookIcon" alt="" class="share-icon" /> <svg viewBox="0 0 24 24" fill="currentColor" class="share-icon"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.791-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>
</button> </button>
<!-- WhatsApp -->
<button class="btn-neon secondary share-btn" :disabled="shareInProgress" :aria-label="t('win.shareWhatsapp')" @click="shareTo('whatsapp')"> <button class="btn-neon secondary share-btn" :disabled="shareInProgress" :aria-label="t('win.shareWhatsapp')" @click="shareTo('whatsapp')">
<img :src="whatsappIcon" alt="" class="share-icon" /> <svg viewBox="0 0 24 24" fill="currentColor" class="share-icon"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.008-.57-.008-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>
</button>
<!-- Download Screenshot (Compact) -->
<button class="btn-neon secondary share-btn" :disabled="shareInProgress" :aria-label="t('win.shareDownload')" @click="downloadShareImage">
<Download :size="20" />
</button> </button>
</div> </div>
<button class="btn-neon secondary share-download" :disabled="shareInProgress" @click="downloadShareImage">
{{ t('win.shareDownload') }}
</button>
</div> </div>
<div class="actions"> <div class="actions">

View File

@@ -29,6 +29,12 @@ const messages = {
'custom.cancel': 'Anuluj', 'custom.cancel': 'Anuluj',
'custom.start': 'Start', 'custom.start': 'Start',
'custom.sizeError': 'Rozmiar musi być między 5 a 80!', 'custom.sizeError': 'Rozmiar musi być między 5 a 80!',
'custom.fillRate': 'Wypełnienie',
'custom.difficulty': 'Poziom trudności',
'difficulty.easy': 'Łatwy',
'difficulty.harder': 'Trudniejszy',
'difficulty.hardest': 'Najtrudniejszy',
'difficulty.extreme': 'Ekstremalny',
'win.title': 'GRATULACJE!', 'win.title': 'GRATULACJE!',
'win.message': 'Rozwiązałeś zagadkę!', 'win.message': 'Rozwiązałeś zagadkę!',
'win.time': 'Czas:', 'win.time': 'Czas:',
@@ -39,6 +45,8 @@ const messages = {
'win.shareFacebook': 'Facebook', 'win.shareFacebook': 'Facebook',
'win.shareWhatsapp': 'WhatsApp', 'win.shareWhatsapp': 'WhatsApp',
'win.shareDownload': 'Pobierz zrzut', 'win.shareDownload': 'Pobierz zrzut',
'win.difficulty': 'Poziom:',
'win.usedGuide': 'Podpowiedzi: {percent}% ({count})',
'pwa.installTitle': 'Zainstaluj aplikację i graj offline', 'pwa.installTitle': 'Zainstaluj aplikację i graj offline',
'pwa.installMobile': 'Dodaj do ekranu głównego', 'pwa.installMobile': 'Dodaj do ekranu głównego',
'pwa.installDesktop': 'Zainstaluj na komputerze', 'pwa.installDesktop': 'Zainstaluj na komputerze',
@@ -128,6 +136,12 @@ const messages = {
'custom.cancel': 'Cancel', 'custom.cancel': 'Cancel',
'custom.start': 'Start', 'custom.start': 'Start',
'custom.sizeError': 'Size must be between 5 and 80!', 'custom.sizeError': 'Size must be between 5 and 80!',
'custom.fillRate': 'Fill Rate',
'custom.difficulty': 'Difficulty',
'difficulty.easy': 'Easy',
'difficulty.harder': 'Harder',
'difficulty.hardest': 'Hardest',
'difficulty.extreme': 'Extreme',
'win.title': 'CONGRATULATIONS!', 'win.title': 'CONGRATULATIONS!',
'win.message': 'You solved the puzzle!', 'win.message': 'You solved the puzzle!',
'win.time': 'Time:', 'win.time': 'Time:',
@@ -138,6 +152,8 @@ const messages = {
'win.shareFacebook': 'Facebook', 'win.shareFacebook': 'Facebook',
'win.shareWhatsapp': 'WhatsApp', 'win.shareWhatsapp': 'WhatsApp',
'win.shareDownload': 'Download screenshot', 'win.shareDownload': 'Download screenshot',
'win.difficulty': 'Difficulty:',
'win.usedGuide': 'Hints: {percent}% ({count})',
'pwa.installTitle': 'Install the app and play offline', 'pwa.installTitle': 'Install the app and play offline',
'pwa.installMobile': 'Add to home screen', 'pwa.installMobile': 'Add to home screen',
'pwa.installDesktop': 'Install on desktop', 'pwa.installDesktop': 'Install on desktop',
@@ -279,9 +295,17 @@ const messages = {
'custom.cancel': '取消', 'custom.cancel': '取消',
'custom.start': '开始', 'custom.start': '开始',
'custom.sizeError': '尺寸必须在 5 到 80 之间!', 'custom.sizeError': '尺寸必须在 5 到 80 之间!',
'custom.fillRate': '填充率',
'custom.difficulty': '难度',
'difficulty.easy': '简单',
'difficulty.harder': '较难',
'difficulty.hardest': '最难',
'difficulty.extreme': '极限',
'win.title': '恭喜!', 'win.title': '恭喜!',
'win.message': '你解开了谜题!', 'win.message': '你解开了谜题!',
'win.time': '时间:', 'win.time': '时间:',
'win.difficulty': '难度:',
'win.usedGuide': '使用指南: {count}',
'win.playAgain': '再玩一次', 'win.playAgain': '再玩一次',
'win.shareTitle': '分享你的结果', 'win.shareTitle': '分享你的结果',
'win.shareText': '我在 {time} 内解开了 {size}x{size} 的数织!', 'win.shareText': '我在 {time} 内解开了 {size}x{size} 的数织!',
@@ -479,9 +503,17 @@ const messages = {
'custom.cancel': 'Cancelar', 'custom.cancel': 'Cancelar',
'custom.start': 'Empezar', 'custom.start': 'Empezar',
'custom.sizeError': '¡El tamaño debe estar entre 5 y 80!', 'custom.sizeError': '¡El tamaño debe estar entre 5 y 80!',
'custom.fillRate': 'Relleno',
'custom.difficulty': 'Dificultad',
'difficulty.easy': 'Fácil',
'difficulty.harder': 'Más difícil',
'difficulty.hardest': 'El más difícil',
'difficulty.extreme': 'Extremo',
'win.title': '¡FELICIDADES!', 'win.title': '¡FELICIDADES!',
'win.message': '¡Has resuelto el rompecabezas!', 'win.message': '¡Has resuelto el rompecabezas!',
'win.time': 'Tiempo:', 'win.time': 'Tiempo:',
'win.difficulty': 'Dificultad:',
'win.usedGuide': 'Guía usada: {count}',
'win.playAgain': 'Jugar de nuevo', 'win.playAgain': 'Jugar de nuevo',
'win.shareTitle': 'Comparte tu resultado', 'win.shareTitle': 'Comparte tu resultado',
'win.shareText': '¡Resolví un nonograma de {size}x{size} en {time}!', 'win.shareText': '¡Resolví un nonograma de {size}x{size} en {time}!',
@@ -545,9 +577,17 @@ const messages = {
'custom.cancel': 'Annuler', 'custom.cancel': 'Annuler',
'custom.start': 'Démarrer', 'custom.start': 'Démarrer',
'custom.sizeError': 'La taille doit être entre 5 et 80 !', 'custom.sizeError': 'La taille doit être entre 5 et 80 !',
'custom.fillRate': 'Remplissage',
'custom.difficulty': 'Difficulté',
'difficulty.easy': 'Facile',
'difficulty.harder': 'Plus difficile',
'difficulty.hardest': 'Le plus difficile',
'difficulty.extreme': 'Extrême',
'win.title': 'FÉLICITATIONS !', 'win.title': 'FÉLICITATIONS !',
'win.message': 'Vous avez résolu le puzzle !', 'win.message': 'Vous avez résolu le puzzle !',
'win.time': 'Temps:', 'win.time': 'Temps:',
'win.difficulty': 'Difficulté :',
'win.usedGuide': 'Guide utilisé : {count}',
'win.playAgain': 'Rejouer', 'win.playAgain': 'Rejouer',
'win.shareTitle': 'Partagez votre résultat', 'win.shareTitle': 'Partagez votre résultat',
'win.shareText': 'Jai résolu un nonogramme {size}x{size} en {time} !', 'win.shareText': 'Jai résolu un nonogramme {size}x{size} en {time} !',
@@ -611,9 +651,17 @@ const messages = {
'custom.cancel': 'إلغاء', 'custom.cancel': 'إلغاء',
'custom.start': 'ابدأ', 'custom.start': 'ابدأ',
'custom.sizeError': 'يجب أن يكون الحجم بين 5 و80!', 'custom.sizeError': 'يجب أن يكون الحجم بين 5 و80!',
'custom.fillRate': 'معدل الملء',
'custom.difficulty': 'الصعوبة',
'difficulty.easy': 'سهل',
'difficulty.harder': 'أصعب',
'difficulty.hardest': 'الأصعب',
'difficulty.extreme': 'أقصى',
'win.title': 'تهانينا!', 'win.title': 'تهانينا!',
'win.message': 'لقد حللت اللغز!', 'win.message': 'لقد حللت اللغز!',
'win.time': 'الوقت:', 'win.time': 'الوقت:',
'win.difficulty': 'الصعوبة:',
'win.usedGuide': 'تم استخدام الدليل: {count}',
'win.playAgain': 'العب مرة أخرى', 'win.playAgain': 'العب مرة أخرى',
'win.shareTitle': 'شارك نتيجتك', 'win.shareTitle': 'شارك نتيجتك',
'win.shareText': 'حللت نونوغرام {size}x{size} في {time}!', 'win.shareText': 'حللت نونوغرام {size}x{size} في {time}!',
@@ -743,9 +791,17 @@ const messages = {
'custom.cancel': 'Отмена', 'custom.cancel': 'Отмена',
'custom.start': 'Старт', 'custom.start': 'Старт',
'custom.sizeError': 'Размер должен быть от 5 до 80!', 'custom.sizeError': 'Размер должен быть от 5 до 80!',
'custom.fillRate': 'Заполнение',
'custom.difficulty': 'Сложность',
'difficulty.easy': 'Легкий',
'difficulty.harder': 'Сложный',
'difficulty.hardest': 'Очень сложный',
'difficulty.extreme': 'Экстремальный',
'win.title': 'ПОЗДРАВЛЯЕМ!', 'win.title': 'ПОЗДРАВЛЯЕМ!',
'win.message': 'Вы решили головоломку!', 'win.message': 'Вы решили головоломку!',
'win.time': 'Время:', 'win.time': 'Время:',
'win.difficulty': 'Сложность:',
'win.usedGuide': 'Подсказок использовано: {count}',
'win.playAgain': 'Сыграть снова', 'win.playAgain': 'Сыграть снова',
'win.shareTitle': 'Поделитесь результатом', 'win.shareTitle': 'Поделитесь результатом',
'win.shareText': 'Я решил(а) нонограмму {size}x{size} за {time}!', 'win.shareText': 'Я решил(а) нонограмму {size}x{size} за {time}!',
@@ -942,9 +998,17 @@ const messages = {
'custom.cancel': 'Abbrechen', 'custom.cancel': 'Abbrechen',
'custom.start': 'Start', 'custom.start': 'Start',
'custom.sizeError': 'Die Größe muss zwischen 5 und 80 liegen!', 'custom.sizeError': 'Die Größe muss zwischen 5 und 80 liegen!',
'custom.fillRate': 'Füllrate',
'custom.difficulty': 'Schwierigkeit',
'difficulty.easy': 'Einfach',
'difficulty.harder': 'Schwerer',
'difficulty.hardest': 'Am schwersten',
'difficulty.extreme': 'Extrem',
'win.title': 'HERZLICHEN GLÜCKWUNSCH!', 'win.title': 'HERZLICHEN GLÜCKWUNSCH!',
'win.message': 'Sie haben das Rätsel gelöst!', 'win.message': 'Sie haben das Rätsel gelöst!',
'win.time': 'Zeit:', 'win.time': 'Zeit:',
'win.difficulty': 'Schwierigkeit:',
'win.usedGuide': 'Hilfe benutzt: {count}',
'win.playAgain': 'Erneut spielen', 'win.playAgain': 'Erneut spielen',
'win.shareTitle': 'Teilen Sie Ihr Ergebnis', 'win.shareTitle': 'Teilen Sie Ihr Ergebnis',
'win.shareText': 'Ich habe ein {size}x{size} Nonogramm in {time} gelöst!', 'win.shareText': 'Ich habe ein {size}x{size} Nonogramm in {time} gelöst!',
@@ -3408,10 +3472,10 @@ const messages = {
'pwa.installTitle': 'Qosymşany ornatyp, oflain oinañyz', 'pwa.installTitle': 'Qosymşany ornatyp, oflain oinañyz',
'pwa.installMobile': 'Basty ekranğa qosu', 'pwa.installMobile': 'Basty ekranğa qosu',
'pwa.installDesktop': 'Jūmys stolyna ornatu', 'pwa.installDesktop': 'Jūmys stolyna ornatu',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'Қолданба офлайн жұмыс істеуге дайын',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'Жаңа мазмұн қолжетімді, жаңарту үшін қайта жүктеу түймесін басыңыз',
'pwa.reload': 'Reload', 'pwa.reload': 'Қайта жүктеу',
'pwa.close': 'Close', 'pwa.close': 'Жабу',
'language.label': 'Til tañdau', 'language.label': 'Til tañdau',
'theme.label': 'Taqyryp', 'theme.label': 'Taqyryp',
'theme.system': 'Jüye', 'theme.system': 'Jüye',
@@ -3463,10 +3527,10 @@ const messages = {
'pwa.installTitle': 'એપ્લિકેશન ઇન્સ્ટોલ કરો અને ઑફલાઇન રમો', 'pwa.installTitle': 'એપ્લિકેશન ઇન્સ્ટોલ કરો અને ઑફલાઇન રમો',
'pwa.installMobile': 'હોમ સ્ક્રીનમાં ઉમેરો', 'pwa.installMobile': 'હોમ સ્ક્રીનમાં ઉમેરો',
'pwa.installDesktop': 'ડેસ્કટોપ પર ઇન્સ્ટોલ કરો', 'pwa.installDesktop': 'ડેસ્કટોપ પર ઇન્સ્ટોલ કરો',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'એપ્લિકેશન ઑફલાઇન કામ કરવા માટે તૈયાર છે',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'નવી સામગ્રી ઉપલબ્ધ છે, અપડેટ કરવા માટે રિકોડ બટન પર ક્લિક કરો',
'pwa.reload': 'Reload', 'pwa.reload': 'રીલોડ',
'pwa.close': 'Close', 'pwa.close': 'બંધ કરો',
'language.label': 'ભાષા પસંદગી', 'language.label': 'ભાષા પસંદગી',
'theme.label': 'થીમ', 'theme.label': 'થીમ',
'theme.system': 'સિસ્ટમ', 'theme.system': 'સિસ્ટમ',
@@ -3573,10 +3637,10 @@ const messages = {
'pwa.installTitle': 'अॅप इन्स्टॉल करा आणि ऑफलाइन खेळा', 'pwa.installTitle': 'अॅप इन्स्टॉल करा आणि ऑफलाइन खेळा',
'pwa.installMobile': 'होम स्क्रीनवर जोडा', 'pwa.installMobile': 'होम स्क्रीनवर जोडा',
'pwa.installDesktop': 'डेस्कटॉपवर इन्स्टॉल करा', 'pwa.installDesktop': 'डेस्कटॉपवर इन्स्टॉल करा',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'अॅप ऑफलाइन कार्य करण्यासाठी तयार आहे',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'नवीन सामग्री उपलब्ध आहे, अपडेट करण्यासाठी रीलोड बटणावर क्लिक करा',
'pwa.reload': 'Reload', 'pwa.reload': 'रीलोड',
'pwa.close': 'Close', 'pwa.close': 'बंद करा',
'language.label': 'भाषा निवड', 'language.label': 'भाषा निवड',
'theme.label': 'थीम', 'theme.label': 'थीम',
'theme.system': 'सिस्टम', 'theme.system': 'सिस्टम',
@@ -3683,10 +3747,10 @@ const messages = {
'pwa.installTitle': 'செயலியை நிறுவி ஆஃப்லைனில் விளையாடுங்கள்', 'pwa.installTitle': 'செயலியை நிறுவி ஆஃப்லைனில் விளையாடுங்கள்',
'pwa.installMobile': 'முகப்புத் திரையில் சேர்', 'pwa.installMobile': 'முகப்புத் திரையில் சேர்',
'pwa.installDesktop': 'டெஸ்க்டாப்பில் நிறுவு', 'pwa.installDesktop': 'டெஸ்க்டாப்பில் நிறுவு',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'செயலி ஆஃப்லைனில் வேலை செய்யத் தயாராக உள்ளது',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'புதிய உள்ளடக்கம் கிடைக்கிறது, புதுப்பிக்க ரீலோட் பொத்தானைக் கிளிக் செய்யவும்',
'pwa.reload': 'Reload', 'pwa.reload': 'ரீலோட்',
'pwa.close': 'Close', 'pwa.close': 'மூடு',
'language.label': 'மொழி தேர்வு', 'language.label': 'மொழி தேர்வு',
'theme.label': 'தீம்', 'theme.label': 'தீம்',
'theme.system': 'அமைப்பு', 'theme.system': 'அமைப்பு',
@@ -3738,10 +3802,10 @@ const messages = {
'pwa.installTitle': 'యాప్‌ను ఇన్‌స్టాల్ చేయండి మరియు ఆఫ్‌లైన్‌లో ఆడండి', 'pwa.installTitle': 'యాప్‌ను ఇన్‌స్టాల్ చేయండి మరియు ఆఫ్‌లైన్‌లో ఆడండి',
'pwa.installMobile': 'హోమ్ స్క్రీన్‌కు జోడించు', 'pwa.installMobile': 'హోమ్ స్క్రీన్‌కు జోడించు',
'pwa.installDesktop': 'డెస్క్‌టాప్‌లో ఇన్‌స్టాల్ చేయండి', 'pwa.installDesktop': 'డెస్క్‌టాప్‌లో ఇన్‌స్టాల్ చేయండి',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'యాప్ ఆఫ్‌లైన్‌లో పని చేయడానికి సిద్ధంగా ఉంది',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'కొత్త కంటెంట్ అందుబాటులో ఉంది, అప్‌డేట్ చేయడానికి రీలోడ్ బటన్‌పై క్లిక్ చేయండి',
'pwa.reload': 'Reload', 'pwa.reload': 'రీలోడ్',
'pwa.close': 'Close', 'pwa.close': 'మూసివేయి',
'language.label': 'భాష ఎంపిక', 'language.label': 'భాష ఎంపిక',
'theme.label': 'థీమ్', 'theme.label': 'థీమ్',
'theme.system': 'సిస్టమ్', 'theme.system': 'సిస్టమ్',
@@ -3793,10 +3857,10 @@ const messages = {
'pwa.installTitle': 'एप इन्स्टल गर्नुहोस् र अफलाइन खेल्नुहोस्', 'pwa.installTitle': 'एप इन्स्टल गर्नुहोस् र अफलाइन खेल्नुहोस्',
'pwa.installMobile': 'होम स्क्रिनमा थप्नुहोस्', 'pwa.installMobile': 'होम स्क्रिनमा थप्नुहोस्',
'pwa.installDesktop': 'डेस्कटपमा इन्स्टल गर्नुहोस्', 'pwa.installDesktop': 'डेस्कटपमा इन्स्टल गर्नुहोस्',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'एप अफलाइन काम गर्न तयार छ',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'नयाँ सामग्री उपलब्ध छ, अपडेट गर्न रिलोड बटनमा क्लिक गर्नुहोस्',
'pwa.reload': 'Reload', 'pwa.reload': 'रिलोड',
'pwa.close': 'Close', 'pwa.close': 'बन्द गर्नुहोस्',
'language.label': 'भाषा चयन', 'language.label': 'भाषा चयन',
'theme.label': 'थिम', 'theme.label': 'थिम',
'theme.system': 'सिस्टम', 'theme.system': 'सिस्टम',
@@ -3848,10 +3912,10 @@ const messages = {
'pwa.installTitle': 'အက်ပ်ထည့်သွင်းပြီး အော့ဖ်လိုင်းကစားပါ', 'pwa.installTitle': 'အက်ပ်ထည့်သွင်းပြီး အော့ဖ်လိုင်းကစားပါ',
'pwa.installMobile': 'ပင်မစာမျက်နှာသို့ထည့်ပါ', 'pwa.installMobile': 'ပင်မစာမျက်နှာသို့ထည့်ပါ',
'pwa.installDesktop': 'ကွန်ပျူတာတွင်ထည့်ပါ', 'pwa.installDesktop': 'ကွန်ပျူတာတွင်ထည့်ပါ',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'အက်ပ်သည် အော့ဖ်လိုင်းအလုပ်လုပ်ရန် အဆင်သင့်ဖြစ်နေပါပြီ',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'အကြောင်းအရာအသစ် ရရှိနိုင်ပါသည်၊ အပ်ဒိတ်လုပ်ရန် ပြန်လည်စတင်ရန် ခလုတ်ကို နှိပ်ပါ',
'pwa.reload': 'Reload', 'pwa.reload': 'ပြန်လည်စတင်သည်',
'pwa.close': 'Close', 'pwa.close': 'ပိတ်သည်',
'language.label': 'ဘာသာစကား', 'language.label': 'ဘာသာစကား',
'theme.label': 'အပြင်အဆင်', 'theme.label': 'အပြင်အဆင်',
'theme.system': 'စနစ်', 'theme.system': 'စနစ်',
@@ -3903,10 +3967,10 @@ const messages = {
'pwa.installTitle': 'ដំឡើងកម្មវិធី ហើយលេងក្រៅបណ្តាញ', 'pwa.installTitle': 'ដំឡើងកម្មវិធី ហើយលេងក្រៅបណ្តាញ',
'pwa.installMobile': 'បន្ថែមទៅអេក្រង់ដើម', 'pwa.installMobile': 'បន្ថែមទៅអេក្រង់ដើម',
'pwa.installDesktop': 'ដំឡើងលើកុំព្យូទ័រ', 'pwa.installDesktop': 'ដំឡើងលើកុំព្យូទ័រ',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'កម្មវិធីរួចរាល់សម្រាប់ការងារក្រៅបណ្តាញ',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'មានមាតិកាថ្មី សូមចុចប៊ូតុងផ្ទុកឡើងវិញដើម្បីធ្វើបច្ចុប្បន្នភាព',
'pwa.reload': 'Reload', 'pwa.reload': 'ផ្ទុកឡើងវិញ',
'pwa.close': 'Close', 'pwa.close': 'បិទ',
'language.label': 'ជ្រើសរើសភាសា', 'language.label': 'ជ្រើសរើសភាសា',
'theme.label': 'ស្បែក', 'theme.label': 'ស្បែក',
'theme.system': 'ប្រព័ន្ធ', 'theme.system': 'ប្រព័ន្ធ',
@@ -3958,10 +4022,10 @@ const messages = {
'pwa.installTitle': 'ຕິດຕັ້ງແອັບ ແລະຫຼິ້ນແບບອອບໄລນ໌', 'pwa.installTitle': 'ຕິດຕັ້ງແອັບ ແລະຫຼິ້ນແບບອອບໄລນ໌',
'pwa.installMobile': 'ເພີ່ມໃສ່ໜ້າຈໍຫຼັກ', 'pwa.installMobile': 'ເພີ່ມໃສ່ໜ້າຈໍຫຼັກ',
'pwa.installDesktop': 'ຕິດຕັ້ງໃສ່ເດັສທັອບ', 'pwa.installDesktop': 'ຕິດຕັ້ງໃສ່ເດັສທັອບ',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'ແອັບພ້ອມທີ່ຈະເຮັດວຽກແບບອອບໄລນ໌',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'ມີເນື້ອຫາໃໝ່, ຄລິກປຸ່ມໂຫຼດຄືນໃໝ່ເພື່ອອັບເດດ',
'pwa.reload': 'Reload', 'pwa.reload': 'ໂຫຼດຄືນໃໝ່',
'pwa.close': 'Close', 'pwa.close': 'ປິດ',
'language.label': 'ເລືອກພາສາ', 'language.label': 'ເລືອກພາສາ',
'theme.label': 'ທີມ', 'theme.label': 'ທີມ',
'theme.system': 'ລະບົບ', 'theme.system': 'ລະບົບ',
@@ -4013,10 +4077,10 @@ const messages = {
'pwa.installTitle': 'Апп суулгаж, офлайн тоглох', 'pwa.installTitle': 'Апп суулгаж, офлайн тоглох',
'pwa.installMobile': 'Нүүр дэлгэцэнд нэмэх', 'pwa.installMobile': 'Нүүр дэлгэцэнд нэмэх',
'pwa.installDesktop': 'Десктопт суулгах', 'pwa.installDesktop': 'Десктопт суулгах',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'Апп офлайн ажиллахад бэлэн байна',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'Шинэ контент бэлэн байна, шинэчлэхийн тулд дахин ачаалах товчийг дарна уу',
'pwa.reload': 'Reload', 'pwa.reload': 'Дахин ачаалах',
'pwa.close': 'Close', 'pwa.close': 'Хаах',
'language.label': 'Хэл сонгох', 'language.label': 'Хэл сонгох',
'theme.label': 'Загвар', 'theme.label': 'Загвар',
'theme.system': 'Систем', 'theme.system': 'Систем',
@@ -4233,10 +4297,10 @@ const messages = {
'pwa.installTitle': 'መተግበሪያውን ይጫኑ እና ከመስመር ውጭ ይጫወቱ', 'pwa.installTitle': 'መተግበሪያውን ይጫኑ እና ከመስመር ውጭ ይጫወቱ',
'pwa.installMobile': 'ወደ መነሻ ገጽ አክል', 'pwa.installMobile': 'ወደ መነሻ ገጽ አክል',
'pwa.installDesktop': 'በኮምፒውተር ላይ ጫን', 'pwa.installDesktop': 'በኮምፒውተር ላይ ጫን',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'መተግበሪያው ከመስመር ውጭ ለመስራት ዝግጁ ነው',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'አዲስ ይዘት አለ፣ ለማዘመን ድጋሚ ጫን የሚለውን ይጫኑ',
'pwa.reload': 'Reload', 'pwa.reload': 'ድጋሚ ጫን',
'pwa.close': 'Close', 'pwa.close': 'ዝጋ',
'language.label': 'ቋንቋ ይምረጡ', 'language.label': 'ቋንቋ ይምረጡ',
'theme.label': 'ገጽታ', 'theme.label': 'ገጽታ',
'theme.system': 'ስርዓት', 'theme.system': 'ስርዓት',
@@ -4398,10 +4462,10 @@ const messages = {
'pwa.installTitle': 'Ku shub abka oo ciyaar offline', 'pwa.installTitle': 'Ku shub abka oo ciyaar offline',
'pwa.installMobile': 'Ku dar shaashadda guriga', 'pwa.installMobile': 'Ku dar shaashadda guriga',
'pwa.installDesktop': 'Ku shub kombiyuutarka', 'pwa.installDesktop': 'Ku shub kombiyuutarka',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'Abka wuxuu diyaar u yahay inuu shaqeeyo offline',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'Waxyaabo cusub ayaa la heli karaa, guji badhanka reload si aad u cusbooneysiiso',
'pwa.reload': 'Reload', 'pwa.reload': 'Dib u sooeli',
'pwa.close': 'Close', 'pwa.close': 'Xir',
'language.label': 'Dooro Luqad', 'language.label': 'Dooro Luqad',
'theme.label': 'Mawduuc', 'theme.label': 'Mawduuc',
'theme.system': 'Nidaamka', 'theme.system': 'Nidaamka',
@@ -4453,10 +4517,10 @@ const messages = {
'pwa.installTitle': 'Shyira porogaramu ukine udafite interineti', 'pwa.installTitle': 'Shyira porogaramu ukine udafite interineti',
'pwa.installMobile': 'Ongeraho kuri ecran y\'ibanze', 'pwa.installMobile': 'Ongeraho kuri ecran y\'ibanze',
'pwa.installDesktop': 'Shyira kuri mudasobwa', 'pwa.installDesktop': 'Shyira kuri mudasobwa',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'Porogaramu yiteguye gukora idafite interineti',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'Ibirimo bishya birahari, kanda kuri reload kugirango uvugurure',
'pwa.reload': 'Reload', 'pwa.reload': 'Ongera utangire',
'pwa.close': 'Close', 'pwa.close': 'Funga',
'language.label': 'Hitamo Ururimi', 'language.label': 'Hitamo Ururimi',
'theme.label': 'Insanganyamatsiko', 'theme.label': 'Insanganyamatsiko',
'theme.system': 'Sisteme', 'theme.system': 'Sisteme',
@@ -4508,10 +4572,10 @@ const messages = {
'pwa.installTitle': 'Shira porogaramu ukine udafite interineti', 'pwa.installTitle': 'Shira porogaramu ukine udafite interineti',
'pwa.installMobile': 'Ongerako kuri ecran nkuru', 'pwa.installMobile': 'Ongerako kuri ecran nkuru',
'pwa.installDesktop': 'Shirako kuri mudasobwa', 'pwa.installDesktop': 'Shirako kuri mudasobwa',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'Porogaramu yiteguye gukora idafite interineti',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'Ibirimo bishya birahari, kanda kuri reload kugirango uvugurure',
'pwa.reload': 'Reload', 'pwa.reload': 'Subiramwo',
'pwa.close': 'Close', 'pwa.close': 'Ugara',
'language.label': 'Hitamo Ururimi', 'language.label': 'Hitamo Ururimi',
'theme.label': 'Insanganyamatsiko', 'theme.label': 'Insanganyamatsiko',
'theme.system': 'Sisitemu', 'theme.system': 'Sisitemu',
@@ -4563,10 +4627,10 @@ const messages = {
'pwa.installTitle': 'Sampal aplikasioŋ bi te po offline', 'pwa.installTitle': 'Sampal aplikasioŋ bi te po offline',
'pwa.installMobile': 'Yokk ci ekranu kër', 'pwa.installMobile': 'Yokk ci ekranu kër',
'pwa.installDesktop': 'Sampal ci ordinatër', 'pwa.installDesktop': 'Sampal ci ordinatër',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'Application bi pare na ngir liggéey offline',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'Am na content bu bees, bës reload ngir yeesal',
'pwa.reload': 'Reload', 'pwa.reload': 'Dugal aat',
'pwa.close': 'Close', 'pwa.close': 'Tëj',
'language.label': 'Tann Làkk', 'language.label': 'Tann Làkk',
'theme.label': 'Theme', 'theme.label': 'Theme',
'theme.system': 'System', 'theme.system': 'System',
@@ -4618,10 +4682,10 @@ const messages = {
'pwa.installTitle': 'Appii fe\'iitii offline taphadhu', 'pwa.installTitle': 'Appii fe\'iitii offline taphadhu',
'pwa.installMobile': 'Iskirinii manaa irratti dabali', 'pwa.installMobile': 'Iskirinii manaa irratti dabali',
'pwa.installDesktop': 'Kompyuutara irratti fe\'i', 'pwa.installDesktop': 'Kompyuutara irratti fe\'i',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'Appichi offline hojjechuuf qophiidha',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'Qabiyyee haaraan ni jira, update gochuuf reload tuqi',
'pwa.reload': 'Reload', 'pwa.reload': 'Deebisii fe\'i',
'pwa.close': 'Close', 'pwa.close': 'Cufi',
'language.label': 'Afaan Filadhu', 'language.label': 'Afaan Filadhu',
'theme.label': 'Bifa', 'theme.label': 'Bifa',
'theme.system': 'Sistimii', 'theme.system': 'Sistimii',
@@ -4673,10 +4737,10 @@ const messages = {
'pwa.installTitle': 'ኣፕ ጽዓን እሞ ብዘይ ኢንተርኔት ተጫወት', 'pwa.installTitle': 'ኣፕ ጽዓን እሞ ብዘይ ኢንተርኔት ተጫወት',
'pwa.installMobile': 'ናብ ሆም ስክሪን ወስኽ', 'pwa.installMobile': 'ናብ ሆም ስክሪን ወስኽ',
'pwa.installDesktop': 'ኣብ ኮምፒተር ጽዓን', 'pwa.installDesktop': 'ኣብ ኮምፒተር ጽዓን',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'ኣፕ ብዘይ ኢንተርኔት ንምስራሕ ድሉው እዩ',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'ሓድሽ ትሕዝቶ ኣሎ፡ ንምሕዳስ reload ጠውቕ',
'pwa.reload': 'Reload', 'pwa.reload': 'ደጊምካ ጽዓን',
'pwa.close': 'Close', 'pwa.close': 'ዕጸው',
'language.label': 'ቋንቋ ምረጽ', 'language.label': 'ቋንቋ ምረጽ',
'theme.label': 'ቴማ', 'theme.label': 'ቴማ',
'theme.system': 'ሲስተም', 'theme.system': 'ሲስተም',
@@ -4838,10 +4902,10 @@ const messages = {
'pwa.installTitle': 'I-install ti app ken agay-ayam offline', 'pwa.installTitle': 'I-install ti app ken agay-ayam offline',
'pwa.installMobile': 'Inayon iti home screen', 'pwa.installMobile': 'Inayon iti home screen',
'pwa.installDesktop': 'I-install iti desktop', 'pwa.installDesktop': 'I-install iti desktop',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'Nakasagana ti app nga agtrabaho offline',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'Adda baro a linaon, i-klik ti reload button tapno ma-update',
'pwa.reload': 'Reload', 'pwa.reload': 'I-reload',
'pwa.close': 'Close', 'pwa.close': 'Ikkata',
'language.label': 'Piliem ti Pagsasao', 'language.label': 'Piliem ti Pagsasao',
'theme.label': 'Tema', 'theme.label': 'Tema',
'theme.system': 'Sistema', 'theme.system': 'Sistema',
@@ -4948,10 +5012,10 @@ const messages = {
'pwa.installTitle': 'Serlêdanê saz bike û offline bilîze', 'pwa.installTitle': 'Serlêdanê saz bike û offline bilîze',
'pwa.installMobile': 'Li ekrana malê zêde bike', 'pwa.installMobile': 'Li ekrana malê zêde bike',
'pwa.installDesktop': 'Li ser sermaseyê saz bike', 'pwa.installDesktop': 'Li ser sermaseyê saz bike',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'Bername ji bo xebata offline amade ye',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'Naveroka nû heye, ji bo nûvekirinê pêl bişkoja reload bike',
'pwa.reload': 'Reload', 'pwa.reload': 'Dîsa bar bike',
'pwa.close': 'Close', 'pwa.close': 'Bigire',
'language.label': 'Ziman Hilbijêre', 'language.label': 'Ziman Hilbijêre',
'theme.label': 'Mijar', 'theme.label': 'Mijar',
'theme.system': 'Pergal', 'theme.system': 'Pergal',
@@ -5003,10 +5067,10 @@ const messages = {
'pwa.installTitle': 'ئەپەکە دابەزێنە و بەبێ ئینتەرنێت یاری بکە', 'pwa.installTitle': 'ئەپەکە دابەزێنە و بەبێ ئینتەرنێت یاری بکە',
'pwa.installMobile': 'زیادکردن بۆ شاشەی سەرەکی', 'pwa.installMobile': 'زیادکردن بۆ شاشەی سەرەکی',
'pwa.installDesktop': 'دابەزاندن بۆ سەر کۆمپیوتەر', 'pwa.installDesktop': 'دابەزاندن بۆ سەر کۆمپیوتەر',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'ئەپەکە ئامادەیە بۆ کارکردن بەبێ ئینتەرنێت',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'ناوەرۆکی نوێ بەردەستە، کلیک لە دوگمەی نوێکردنەوە بکە بۆ نوێکردنەوە',
'pwa.reload': 'Reload', 'pwa.reload': 'نوێکردنەوە',
'pwa.close': 'Close', 'pwa.close': 'داخستن',
'language.label': 'هەڵبژاردنی زمان', 'language.label': 'هەڵبژاردنی زمان',
'theme.label': 'بابەت', 'theme.label': 'بابەت',
'theme.system': 'سیستەم', 'theme.system': 'سیستەم',
@@ -5058,10 +5122,10 @@ const messages = {
'pwa.installTitle': 'اپلیکیشن نصب کړئ او آفلاین لوبه وکړئ', 'pwa.installTitle': 'اپلیکیشن نصب کړئ او آفلاین لوبه وکړئ',
'pwa.installMobile': 'کور سکرین ته اضافه کړئ', 'pwa.installMobile': 'کور سکرین ته اضافه کړئ',
'pwa.installDesktop': 'په ډیسکټاپ کې نصب کړئ', 'pwa.installDesktop': 'په ډیسکټاپ کې نصب کړئ',
'pwa.offlineReady': 'App ready to work offline', 'pwa.offlineReady': 'ایپ آفلاین کار کولو ته چمتو دی',
'pwa.newContent': 'New content available, click on reload button to update', 'pwa.newContent': 'نوي مینځپانګې شتون لري ، د تازه کولو لپاره د ریلوډ تڼۍ باندې کلیک وکړئ',
'pwa.reload': 'Reload', 'pwa.reload': 'بیا پورته کول',
'pwa.close': 'Close', 'pwa.close': 'بندول',
'language.label': 'ژبه غوره کړئ', 'language.label': 'ژبه غوره کړئ',
'theme.label': 'تیم', 'theme.label': 'تیم',
'theme.system': 'سیستم', 'theme.system': 'سیستم',

View File

@@ -78,6 +78,9 @@ export function useSolver() {
} else if (type === 'done') { } else if (type === 'done') {
isProcessing.value = false; isProcessing.value = false;
pause(); pause();
} else if (type === 'stuck') {
isProcessing.value = false;
pause();
} else { } else {
isProcessing.value = false; isProcessing.value = false;
} }

View File

@@ -64,6 +64,9 @@ export const usePuzzleStore = defineStore('puzzle', () => {
const playerGrid = ref([]); // 0: empty, 1: filled, 2: cross const playerGrid = ref([]); // 0: empty, 1: filled, 2: cross
const isGameWon = ref(false); const isGameWon = ref(false);
const hasUsedGuide = ref(false); const hasUsedGuide = ref(false);
const guideUsageCount = ref(0);
const currentDifficulty = ref(null); // 'easy', 'medium', 'hard', 'custom' or object { density: 0.5 }
const currentDensity = ref(0);
const size = ref(5); const size = ref(5);
const startTime = ref(null); const startTime = ref(null);
const elapsedTime = ref(0); const elapsedTime = ref(0);
@@ -118,23 +121,29 @@ export const usePuzzleStore = defineStore('puzzle', () => {
resetGrid(); resetGrid();
isGameWon.value = false; isGameWon.value = false;
hasUsedGuide.value = false; hasUsedGuide.value = false;
guideUsageCount.value = 0;
currentDensity.value = totalCellsToFill.value / (size.value * size.value);
elapsedTime.value = 0; elapsedTime.value = 0;
startTimer(); startTimer();
saveState();
} }
function initCustomGame(customSize) { function initCustomGame(customSize, density = 0.5) {
stopTimer(); stopTimer();
currentLevelId.value = 'custom'; currentLevelId.value = 'custom';
size.value = customSize; size.value = customSize;
// Generate random grid // Generate random grid
solution.value = generateRandomGrid(customSize); solution.value = generateRandomGrid(customSize, density);
resetGrid(); resetGrid();
isGameWon.value = false; isGameWon.value = false;
hasUsedGuide.value = false; hasUsedGuide.value = false;
guideUsageCount.value = 0;
currentDensity.value = density;
elapsedTime.value = 0; elapsedTime.value = 0;
startTimer(); startTimer();
saveState();
} }
function resetGrid() { function resetGrid() {
@@ -242,6 +251,8 @@ export const usePuzzleStore = defineStore('puzzle', () => {
playerGrid: playerGrid.value, playerGrid: playerGrid.value,
isGameWon: isGameWon.value, isGameWon: isGameWon.value,
hasUsedGuide: hasUsedGuide.value, hasUsedGuide: hasUsedGuide.value,
guideUsageCount: guideUsageCount.value,
currentDensity: currentDensity.value,
elapsedTime: elapsedTime.value, elapsedTime: elapsedTime.value,
moves: moves.value, moves: moves.value,
history: history.value history: history.value
@@ -259,6 +270,9 @@ export const usePuzzleStore = defineStore('puzzle', () => {
solution.value = parsed.solution; solution.value = parsed.solution;
playerGrid.value = parsed.playerGrid; playerGrid.value = parsed.playerGrid;
isGameWon.value = parsed.isGameWon; isGameWon.value = parsed.isGameWon;
hasUsedGuide.value = parsed.hasUsedGuide || false;
guideUsageCount.value = parsed.guideUsageCount || 0;
currentDensity.value = parsed.currentDensity || 0;
elapsedTime.value = parsed.elapsedTime || 0; elapsedTime.value = parsed.elapsedTime || 0;
moves.value = parsed.moves || 0; moves.value = parsed.moves || 0;
history.value = parsed.history || []; history.value = parsed.history || [];
@@ -275,44 +289,9 @@ export const usePuzzleStore = defineStore('puzzle', () => {
return false; return false;
} }
function initGame(levelId = 'easy') { // Duplicate initGame removed
// If init called without args and we have save, load it?
// User might want to start fresh if clicking buttons.
// Let's add explicit 'continue' logic or just auto-load on first run.
// For now, let's just stick to explicit init, but maybe load on mount if exists?
// The user didn't explicitly ask for "Continue", but "features from HTML".
// HTML usually auto-saves and loads.
stopTimer();
currentLevelId.value = levelId;
let puzzle = PUZZLES[levelId];
if (!puzzle) {
puzzle = PUZZLES['easy'];
}
size.value = puzzle.size;
solution.value = puzzle.grid;
resetGrid();
isGameWon.value = false;
elapsedTime.value = 0;
startTimer();
saveState();
}
// Modify initCustomGame similarly // Duplicate initCustomGame removed
function initCustomGame(customSize) {
stopTimer();
currentLevelId.value = 'custom';
size.value = customSize;
solution.value = generateRandomGrid(customSize);
resetGrid();
isGameWon.value = false;
elapsedTime.value = 0;
startTimer();
saveState();
}
// Duplicate toggleCell/setCell removed // Duplicate toggleCell/setCell removed
@@ -321,6 +300,7 @@ export const usePuzzleStore = defineStore('puzzle', () => {
resetGrid(); resetGrid();
isGameWon.value = false; isGameWon.value = false;
hasUsedGuide.value = false; hasUsedGuide.value = false;
guideUsageCount.value = 0;
elapsedTime.value = 0; elapsedTime.value = 0;
startTimer(); startTimer();
saveState(); saveState();
@@ -332,6 +312,7 @@ export const usePuzzleStore = defineStore('puzzle', () => {
function markGuideUsed() { function markGuideUsed() {
if (isGameWon.value) return; if (isGameWon.value) return;
hasUsedGuide.value = true; hasUsedGuide.value = true;
guideUsageCount.value++;
saveState(); saveState();
} }
@@ -360,6 +341,8 @@ export const usePuzzleStore = defineStore('puzzle', () => {
undo, undo,
closeWinModal, closeWinModal,
hasUsedGuide, hasUsedGuide,
guideUsageCount,
currentDensity,
markGuideUsed markGuideUsed
}; };

View File

@@ -40,15 +40,36 @@ export function calculateHints(grid) {
return { rowHints, colHints }; return { rowHints, colHints };
} }
export function generateRandomGrid(size) { export function generateRandomGrid(size, density = 0.5) {
const grid = []; const grid = [];
for (let i = 0; i < size; i++) { for (let i = 0; i < size; i++) {
const row = []; const row = [];
for (let j = 0; j < size; j++) { for (let j = 0; j < size; j++) {
// ~25% empty cells row.push(Math.random() < density ? 1 : 0);
row.push(Math.random() > 0.25 ? 1 : 0);
} }
grid.push(row); grid.push(row);
} }
return grid; return grid;
} }
export function calculateDifficulty(density) {
// Shannon Entropy: H(x) = -x*log2(x) - (1-x)*log2(1-x)
// Normalized to 0-1 range (since max entropy at 0.5 is 1)
// Avoid log(0)
if (density <= 0 || density >= 1) return 'easy';
const entropy = -density * Math.log2(density) - (1 - density) * Math.log2(1 - density);
// Thresholds based on entropy
// 0.5 density -> entropy 1.0 (Extreme)
// 0.4/0.6 density -> entropy ~0.97 (Extreme)
// 0.3/0.7 density -> entropy ~0.88 (Hardest)
// 0.2/0.8 density -> entropy ~0.72 (Harder)
// <0.2/>0.8 density -> entropy <0.72 (Easy)
if (entropy >= 0.96) return 'extreme'; // approx 38% - 62%
if (entropy >= 0.85) return 'hardest'; // approx 28% - 38% & 62% - 72%
if (entropy >= 0.65) return 'harder'; // approx 17% - 28% & 72% - 83%
return 'easy';
}

View File

@@ -5,7 +5,7 @@ const messages = {
'worker.solved': 'Rozwiązane!', 'worker.solved': 'Rozwiązane!',
'worker.logicRow': 'Logika: Wiersz {row}, Kolumna {col} -> {state}', 'worker.logicRow': 'Logika: Wiersz {row}, Kolumna {col} -> {state}',
'worker.logicCol': 'Logika: Kolumna {col}, Wiersz {row} -> {state}', 'worker.logicCol': 'Logika: Kolumna {col}, Wiersz {row} -> {state}',
'worker.guess': 'Zgadywanie: Wiersz {row}, Kolumna {col}', 'worker.stuck': 'Brak logicznego ruchu. Spróbuj zgadnąć lub cofnąć.',
'worker.done': 'Koniec!', 'worker.done': 'Koniec!',
'worker.state.filled': 'Pełne', 'worker.state.filled': 'Pełne',
'worker.state.empty': 'Puste' 'worker.state.empty': 'Puste'
@@ -14,7 +14,7 @@ const messages = {
'worker.solved': 'Solved!', 'worker.solved': 'Solved!',
'worker.logicRow': 'Logic: Row {row}, Column {col} -> {state}', 'worker.logicRow': 'Logic: Row {row}, Column {col} -> {state}',
'worker.logicCol': 'Logic: Column {col}, Row {row} -> {state}', 'worker.logicCol': 'Logic: Column {col}, Row {row} -> {state}',
'worker.guess': 'Guessing: Row {row}, Column {col}', 'worker.stuck': 'No logical move found. Try guessing or undoing.',
'worker.done': 'Done!', 'worker.done': 'Done!',
'worker.state.filled': 'Filled', 'worker.state.filled': 'Filled',
'worker.state.empty': 'Empty' 'worker.state.empty': 'Empty'
@@ -236,29 +236,9 @@ const handleStep = (playerGrid, solution, locale) => {
} }
} }
for (let r = 0; r < size; r++) { // Check for guess logic - we want to avoid this unless strictly necessary
for (let c = 0; c < size; c++) { // If no logic move found, return 'stuck' instead of cheating
const current = playerGrid[r][c]; return { type: 'stuck', statusText: t(locale, 'worker.stuck') };
const target = solution[r][c];
let isCorrect = false;
if (target === 1 && current === 1) isCorrect = true;
if (target === 0 && current === 2) isCorrect = true;
if (target === 0 && current === 0) isCorrect = false;
if (target === 1 && current === 0) isCorrect = false;
if (!isCorrect) {
const newState = target === 1 ? 1 : 2;
return {
type: 'move',
r,
c,
state: newState,
statusText: t(locale, 'worker.guess', { row: r + 1, col: c + 1 })
};
}
}
}
return { type: 'done', statusText: t(locale, 'worker.done') };
}; };
self.onmessage = (event) => { self.onmessage = (event) => {