diff --git a/cards/babochka.jpg b/cards/babochka.jpg new file mode 100644 index 0000000..3c1c5a1 Binary files /dev/null and b/cards/babochka.jpg differ diff --git a/cards/belka.jpg b/cards/belka.jpg new file mode 100644 index 0000000..cb04928 Binary files /dev/null and b/cards/belka.jpg differ diff --git a/cards/dyatel.jpg b/cards/dyatel.jpg new file mode 100644 index 0000000..3fbc61d Binary files /dev/null and b/cards/dyatel.jpg differ diff --git a/cards/filin.jpg b/cards/filin.jpg new file mode 100644 index 0000000..a5f1f41 Binary files /dev/null and b/cards/filin.jpg differ diff --git a/cards/golub.jpg b/cards/golub.jpg new file mode 100644 index 0000000..b4df32b Binary files /dev/null and b/cards/golub.jpg differ diff --git a/cards/gus.jpg b/cards/gus.jpg new file mode 100644 index 0000000..ee308b3 Binary files /dev/null and b/cards/gus.jpg differ diff --git a/cards/kaban.jpg b/cards/kaban.jpg new file mode 100644 index 0000000..5d34025 Binary files /dev/null and b/cards/kaban.jpg differ diff --git a/cards/kuznechik.jpg b/cards/kuznechik.jpg new file mode 100644 index 0000000..e2e570f Binary files /dev/null and b/cards/kuznechik.jpg differ diff --git a/cards/lisa.jpg b/cards/lisa.jpg new file mode 100644 index 0000000..d140bed Binary files /dev/null and b/cards/lisa.jpg differ diff --git a/cards/olen.jpg b/cards/olen.jpg new file mode 100644 index 0000000..a59e81d Binary files /dev/null and b/cards/olen.jpg differ diff --git a/cards/strekoza.jpg b/cards/strekoza.jpg new file mode 100644 index 0000000..424873b Binary files /dev/null and b/cards/strekoza.jpg differ diff --git a/cards/zhuk-olen.jpg b/cards/zhuk-olen.jpg new file mode 100644 index 0000000..cc79cfb Binary files /dev/null and b/cards/zhuk-olen.jpg differ diff --git a/index.html b/index.html index 4b627ca..33ad64d 100644 --- a/index.html +++ b/index.html @@ -158,7 +158,7 @@ table.tt { border-collapse: collapse; font-family: var(--font-mono); font-size: .cards { display: flex; flex-wrap: wrap; gap: 4px; min-height: 56px; } .cards.down .card + .card { margin-left: -58px; } .card { width: 64px; height: 56px; background: #fff; border: 1px solid #b9c3d6; border-radius: 4px; display: grid; place-items: center; align-content: center; color: #23409a; font: 700 10px var(--font-body); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); flex: none; } -.card svg { width: 42px; height: 30px; fill: none; stroke: #23409a; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; } +.card img { max-width: 60px; max-height: 52px; border-radius: 3px; } .card.label { width: auto; height: 30px; padding: 0 8px; font-size: 11px; letter-spacing: .05em; } .matches { display: flex; flex-wrap: wrap; gap: 3px; min-height: 40px; align-items: end; } .match { width: 8px; height: 40px; } @@ -807,20 +807,18 @@ table.tt { border-collapse: collapse; font-family: var(--font-mono); font-size: } // Game 8: four birds, four beasts, four insects; the labels lie by the piles in any order. + // Card pictures are cut from a photo of a complete original set (cards/*.jpg). const KINDS = { - P: { label: 'ПТИЦЫ', names: ['гусь', 'утка', 'сова', 'воробей'], - icon: '' }, - Z: { label: 'ЗВЕРИ', names: ['заяц', 'лиса', 'медведь', 'ёж'], - icon: '' }, - N: { label: 'НАСЕКОМЫЕ', names: ['жук', 'бабочка', 'стрекоза', 'муравей'], - icon: '' } + P: { label: 'ПТИЦЫ', names: { голубь: 'golub', гусь: 'gus', дятел: 'dyatel', филин: 'filin' } }, + Z: { label: 'ЗВЕРИ', names: { олень: 'olen', лиса: 'lisa', белка: 'belka', кабан: 'kaban' } }, + N: { label: 'НАСЕКОМЫЕ', names: { кузнечик: 'kuznechik', бабочка: 'babochka', стрекоза: 'strekoza', 'жук-олень': 'zhuk-olen' } } }; - const cardHtml = c => `
${c.name}
`; + const cardHtml = c => `
${c.name}
`; function cardsDesk() { let order, piles, placed, cur, shown, done; const deal = () => { - const deck = Object.keys(KINDS).flatMap(k => KINDS[k].names.map(name => ({ k, name }))); + const deck = Object.keys(KINDS).flatMap(k => Object.keys(KINDS[k].names).map(name => ({ k, name }))); shuffle(deck); order = shuffle(Object.keys(KINDS)); piles = { P: deck.slice(0, 4), Z: deck.slice(4, 8), N: deck.slice(8) }; // index 0 is the top card