Compare commits
129 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c9c0c76d3 | |||
| d4fb9e36a8 | |||
| ab35fcf906 | |||
| 32991301dd | |||
| c5fd928dcb | |||
| f6907671be | |||
| a54fff7257 | |||
| 533bcec2d8 | |||
| ba786f5a09 | |||
| 7ee7cb6d93 | |||
| 14324b09ef | |||
| 124f1f5cf5 | |||
| a6a73b5f36 | |||
| b84fe79806 | |||
| 3248f00d66 | |||
| c680a043ae | |||
| d0ab7ed97b | |||
| 1144a96757 | |||
| ac6668cee7 | |||
| eba1f66b45 | |||
| 90959728b1 | |||
| 8b30f8778b | |||
| d6a7924f14 | |||
| 4db43fb3fb | |||
| 01d6b27e61 | |||
| 3cffbc2c51 | |||
| 2ef25934ac | |||
| bb670d6cc6 | |||
| 76911c57c9 | |||
| 8391235a1a | |||
| 2f3a6b9586 | |||
| 4d20b70809 | |||
| bfadcf0e0d | |||
| 356dbebe57 | |||
| c90c783177 | |||
| bbf4b2c14a | |||
| 62be72e918 | |||
| 1f46785b31 | |||
| 2e5d82f83c | |||
| 396ba6bc97 | |||
| 88298206bb | |||
| 0f65031114 | |||
| c91ce9436e | |||
| ace96b4a47 | |||
| ea079af9e1 | |||
| c66d81c73a | |||
| 20b7a617e0 | |||
| 7a0d57b2b1 | |||
| 93ec4a7478 | |||
| 72dfd741c4 | |||
| 3837a10b15 | |||
| 574115cb71 | |||
| 1707553790 | |||
| 6905f26b56 | |||
| 1b7c4d92aa | |||
| d685224ce6 | |||
| 539779d78b | |||
| f6506c57e5 | |||
| b88f3df119 | |||
| 0dcb783e94 | |||
| ea17f94b6c | |||
| d60dc18add | |||
| 38eefb22e8 | |||
| a579c25d5c | |||
| c40817d845 | |||
| c6c03b8bff | |||
| 5b3925a619 | |||
| 8485b3d1e0 | |||
| 8325bf6cf7 | |||
| ea58f5dd64 | |||
| c518255a2d | |||
| f5da9398f2 | |||
| b82573e7b1 | |||
| 40818f5bd2 | |||
| 228ebbad8a | |||
| 2b33feafc9 | |||
| f8c8c9158e | |||
| 9cc0837088 | |||
| b47462bd27 | |||
| 08d22c822a | |||
| feb581005c | |||
| 00f2d890f1 | |||
| 9533a7d420 | |||
| 5ec5ac1a19 | |||
| 86aea206b8 | |||
| 1bd1c0f927 | |||
| 7be7f4395c | |||
| 66c2907c25 | |||
| c2811fa661 | |||
| 933cc55ea9 | |||
| 58faae1911 | |||
| 96be1b85fb | |||
| bbf7709912 | |||
| 9983b873f9 | |||
| 079349dc0f | |||
| 8f82b9fcb5 | |||
| 0ebe87a411 | |||
| 1e6d153cd0 | |||
| af5ac68947 | |||
| 859b69b3c5 | |||
| 24ab25b0b7 | |||
| 918d83420b | |||
| a381a42f21 | |||
| 04f3dab563 | |||
| d204662415 | |||
| 4f0080dfbc | |||
| 46c3bf4bb2 | |||
| 6beb9f68ac | |||
| a0081a251c | |||
| 7411468e10 | |||
| 9af4046ac3 | |||
| d06af28aef | |||
| 27b58a5b71 | |||
| 3b6c8d2aab | |||
| 51fc8f65b1 | |||
| 65cb41461f | |||
| 24f5d140df | |||
| 03be4fcc67 | |||
| 9564f54fc0 | |||
| b4ada2a07e | |||
| d44cedbea0 | |||
| 75146847f6 | |||
| 566b112d9e | |||
| 198df75f94 | |||
| 40d07122ba | |||
| 08f74d1e25 | |||
| 6e6f3ef1ff | |||
| 549a817bb1 | |||
| 613bbf8799 |
@@ -0,0 +1,131 @@
|
|||||||
|
name: Android Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
# Rebuild whenever app/engine/asset code changes.
|
||||||
|
# Skip server-only, deploy, and doc changes.
|
||||||
|
paths-ignore:
|
||||||
|
- 'deploy/**'
|
||||||
|
- 'argocd/**'
|
||||||
|
- 'solitaire_server/**'
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
env:
|
||||||
|
ANDROID_SDK: /opt/android-sdk
|
||||||
|
NDK_VERSION: "25.2.9519653"
|
||||||
|
BUILD_TOOLS_VERSION: "34.0.0"
|
||||||
|
PLATFORM: "android-34"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-apk:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set short SHA
|
||||||
|
id: meta
|
||||||
|
run: echo "sha=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
# ── System dependencies ────────────────────────────────────────────
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y openjdk-17-jdk-headless unzip zip
|
||||||
|
|
||||||
|
# ── Android SDK (shared cache key with release workflow) ──────────
|
||||||
|
- name: Cache Android SDK
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: sdk-cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.ANDROID_SDK }}
|
||||||
|
key: v2-android-sdk-ndk${{ env.NDK_VERSION }}-bt${{ env.BUILD_TOOLS_VERSION }}
|
||||||
|
|
||||||
|
- name: Install Android SDK + NDK
|
||||||
|
if: steps.sdk-cache.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
sudo mkdir -p ${{ env.ANDROID_SDK }}/cmdline-tools
|
||||||
|
curl -sL \
|
||||||
|
"https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip" \
|
||||||
|
-o /tmp/cmdtools.zip
|
||||||
|
unzip -q /tmp/cmdtools.zip -d /tmp/cmdtools
|
||||||
|
sudo mv /tmp/cmdtools/cmdline-tools ${{ env.ANDROID_SDK }}/cmdline-tools/latest
|
||||||
|
yes | sudo ${{ env.ANDROID_SDK }}/cmdline-tools/latest/bin/sdkmanager \
|
||||||
|
--sdk_root=${{ env.ANDROID_SDK }} --licenses > /dev/null 2>&1 || true
|
||||||
|
sudo ${{ env.ANDROID_SDK }}/cmdline-tools/latest/bin/sdkmanager \
|
||||||
|
--sdk_root=${{ env.ANDROID_SDK }} \
|
||||||
|
"build-tools;${{ env.BUILD_TOOLS_VERSION }}" \
|
||||||
|
"platforms;${{ env.PLATFORM }}" \
|
||||||
|
"ndk;${{ env.NDK_VERSION }}"
|
||||||
|
|
||||||
|
# ── Rust toolchain ─────────────────────────────────────────────────
|
||||||
|
- name: Install Rust stable
|
||||||
|
run: |
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
||||||
|
| sh -s -- -y --default-toolchain stable --no-modify-path
|
||||||
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
- name: Add Android cross-compilation targets
|
||||||
|
run: |
|
||||||
|
rustup target add \
|
||||||
|
aarch64-linux-android \
|
||||||
|
armv7-linux-androideabi \
|
||||||
|
x86_64-linux-android
|
||||||
|
|
||||||
|
# ── Cargo caches ───────────────────────────────────────────────────
|
||||||
|
- name: Cache Cargo registry
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry/index
|
||||||
|
~/.cargo/registry/cache
|
||||||
|
~/.cargo/git/db
|
||||||
|
key: cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: cargo-registry-
|
||||||
|
|
||||||
|
- name: Cache cargo-ndk binary
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: ndk-tool-cache
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/bin/cargo-ndk
|
||||||
|
key: cargo-ndk-${{ runner.os }}-stable
|
||||||
|
|
||||||
|
- name: Cache build artifacts
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: target
|
||||||
|
key: android-target-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }}
|
||||||
|
restore-keys: android-target-${{ hashFiles('**/Cargo.lock') }}-
|
||||||
|
|
||||||
|
- name: Install cargo-ndk
|
||||||
|
if: steps.ndk-tool-cache.outputs.cache-hit != 'true'
|
||||||
|
run: cargo install cargo-ndk --locked
|
||||||
|
|
||||||
|
# ── Build APK ──────────────────────────────────────────────────────
|
||||||
|
# Debug CI only builds arm64-v8a — full three-ABI debug builds blow
|
||||||
|
# past the runner's disk budget (~25 GB of target/ + intermediate
|
||||||
|
# APKs caused apksigner to OOM-on-disk in the previous run). Release
|
||||||
|
# CI still ships all three ABIs from android-release.yml.
|
||||||
|
- name: Build debug APK
|
||||||
|
env:
|
||||||
|
ANDROID_HOME: ${{ env.ANDROID_SDK }}
|
||||||
|
ANDROID_NDK_HOME: ${{ env.ANDROID_SDK }}/ndk/${{ env.NDK_VERSION }}
|
||||||
|
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }}
|
||||||
|
PLATFORM: ${{ env.PLATFORM }}
|
||||||
|
PROFILE: debug
|
||||||
|
ABIS: arm64-v8a
|
||||||
|
run: ./scripts/build_android_apk.sh
|
||||||
|
|
||||||
|
# ── Artifact ───────────────────────────────────────────────────────
|
||||||
|
# Pinned to v3 because Gitea Actions doesn't implement the github.com
|
||||||
|
# artifact service that upload-artifact@v4+ requires; v3 uses the
|
||||||
|
# older chunked HTTP API that Gitea's GHES-compatibility layer
|
||||||
|
# supports.
|
||||||
|
- name: Upload APK
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: solitaire-quest-debug-${{ steps.meta.outputs.sha }}
|
||||||
|
path: target/debug/apk/solitaire-quest.apk
|
||||||
|
retention-days: 30
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
name: Android Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
ANDROID_SDK: /opt/android-sdk
|
||||||
|
NDK_VERSION: "25.2.9519653"
|
||||||
|
BUILD_TOOLS_VERSION: "34.0.0"
|
||||||
|
PLATFORM: "android-34"
|
||||||
|
GITEA_API: https://git.aleshym.co/api/v1
|
||||||
|
REPO: funman300/Rusty_Solitare
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-release-apk:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Extract version from tag
|
||||||
|
id: meta
|
||||||
|
run: echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
# ── System dependencies ────────────────────────────────────────────
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y openjdk-17-jdk-headless unzip zip jq
|
||||||
|
|
||||||
|
# ── Android SDK (shared cache key with debug workflow) ─────────────
|
||||||
|
- name: Cache Android SDK
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: sdk-cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.ANDROID_SDK }}
|
||||||
|
key: v2-android-sdk-ndk${{ env.NDK_VERSION }}-bt${{ env.BUILD_TOOLS_VERSION }}
|
||||||
|
|
||||||
|
- name: Install Android SDK + NDK
|
||||||
|
if: steps.sdk-cache.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
sudo mkdir -p ${{ env.ANDROID_SDK }}/cmdline-tools
|
||||||
|
curl -sL \
|
||||||
|
"https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip" \
|
||||||
|
-o /tmp/cmdtools.zip
|
||||||
|
unzip -q /tmp/cmdtools.zip -d /tmp/cmdtools
|
||||||
|
sudo mv /tmp/cmdtools/cmdline-tools ${{ env.ANDROID_SDK }}/cmdline-tools/latest
|
||||||
|
yes | sudo ${{ env.ANDROID_SDK }}/cmdline-tools/latest/bin/sdkmanager \
|
||||||
|
--sdk_root=${{ env.ANDROID_SDK }} --licenses > /dev/null 2>&1 || true
|
||||||
|
sudo ${{ env.ANDROID_SDK }}/cmdline-tools/latest/bin/sdkmanager \
|
||||||
|
--sdk_root=${{ env.ANDROID_SDK }} \
|
||||||
|
"build-tools;${{ env.BUILD_TOOLS_VERSION }}" \
|
||||||
|
"platforms;${{ env.PLATFORM }}" \
|
||||||
|
"ndk;${{ env.NDK_VERSION }}"
|
||||||
|
|
||||||
|
# ── Rust toolchain ─────────────────────────────────────────────────
|
||||||
|
- name: Install Rust stable
|
||||||
|
run: |
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
||||||
|
| sh -s -- -y --default-toolchain stable --no-modify-path
|
||||||
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
- name: Add Android cross-compilation targets
|
||||||
|
run: |
|
||||||
|
rustup target add \
|
||||||
|
aarch64-linux-android \
|
||||||
|
armv7-linux-androideabi \
|
||||||
|
x86_64-linux-android
|
||||||
|
|
||||||
|
# ── Cargo caches ───────────────────────────────────────────────────
|
||||||
|
- name: Cache Cargo registry
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry/index
|
||||||
|
~/.cargo/registry/cache
|
||||||
|
~/.cargo/git/db
|
||||||
|
key: cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: cargo-registry-
|
||||||
|
|
||||||
|
- name: Cache cargo-ndk binary
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: ndk-tool-cache
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/bin/cargo-ndk
|
||||||
|
key: cargo-ndk-${{ runner.os }}-stable
|
||||||
|
|
||||||
|
- name: Cache build artifacts
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: target
|
||||||
|
key: android-release-target-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }}
|
||||||
|
restore-keys: android-release-target-${{ hashFiles('**/Cargo.lock') }}-
|
||||||
|
|
||||||
|
- name: Install cargo-ndk
|
||||||
|
if: steps.ndk-tool-cache.outputs.cache-hit != 'true'
|
||||||
|
run: cargo install cargo-ndk --locked
|
||||||
|
|
||||||
|
# ── Build & sign with release keystore ─────────────────────────────
|
||||||
|
- name: Decode keystore
|
||||||
|
run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > /tmp/solitaire-release.jks
|
||||||
|
|
||||||
|
- name: Build signed release APK
|
||||||
|
env:
|
||||||
|
ANDROID_HOME: ${{ env.ANDROID_SDK }}
|
||||||
|
ANDROID_NDK_HOME: ${{ env.ANDROID_SDK }}/ndk/${{ env.NDK_VERSION }}
|
||||||
|
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }}
|
||||||
|
PLATFORM: ${{ env.PLATFORM }}
|
||||||
|
PROFILE: release
|
||||||
|
KEYSTORE: /tmp/solitaire-release.jks
|
||||||
|
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }}
|
||||||
|
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||||
|
KEY_PASS: ${{ secrets.KEY_PASS }}
|
||||||
|
APK_OUT: ferrous-solitaire-${{ steps.meta.outputs.tag }}.apk
|
||||||
|
run: ./scripts/build_android_apk.sh
|
||||||
|
|
||||||
|
# ── Publish to Gitea release ───────────────────────────────────────
|
||||||
|
- name: Create Gitea release
|
||||||
|
id: release
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.meta.outputs.tag }}"
|
||||||
|
RESPONSE=$(curl -s -o /tmp/release.json -w "%{http_code}" \
|
||||||
|
-X POST "$GITEA_API/repos/$REPO/releases" \
|
||||||
|
-H "Authorization: token ${{ secrets.CI_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"draft\":false,\"prerelease\":false}")
|
||||||
|
if [ "$RESPONSE" = "409" ]; then
|
||||||
|
curl -sf "$GITEA_API/repos/$REPO/releases/tags/$TAG" \
|
||||||
|
-H "Authorization: token ${{ secrets.CI_TOKEN }}" \
|
||||||
|
> /tmp/release.json
|
||||||
|
elif [ "$RESPONSE" != "201" ]; then
|
||||||
|
echo "Release creation failed with HTTP $RESPONSE"
|
||||||
|
cat /tmp/release.json
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
RELEASE_ID=$(jq -r '.id' /tmp/release.json)
|
||||||
|
echo "release_id=$RELEASE_ID" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Upload signed APK
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.meta.outputs.tag }}"
|
||||||
|
APK="ferrous-solitaire-${TAG}.apk"
|
||||||
|
curl -sf -X POST \
|
||||||
|
"$GITEA_API/repos/$REPO/releases/${{ steps.release.outputs.release_id }}/assets?name=$APK" \
|
||||||
|
-H "Authorization: token ${{ secrets.CI_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary @"$APK"
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
name: Build and Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
# Only run when server code changes, not when CI itself updates deploy/.
|
||||||
|
paths-ignore:
|
||||||
|
- 'deploy/**'
|
||||||
|
- 'argocd/**'
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: git.aleshym.co
|
||||||
|
IMAGE: git.aleshym.co/funman300/solitaire-server
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
# Need full history so we can push the tag-update commit back.
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.CI_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set image tag
|
||||||
|
id: meta
|
||||||
|
run: echo "sha=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Log in to Gitea registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.CI_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver-opts: network=host
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: solitaire_server/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ env.IMAGE }}:${{ steps.meta.outputs.sha }}
|
||||||
|
${{ env.IMAGE }}:latest
|
||||||
|
cache-from: type=registry,ref=${{ env.IMAGE }}:buildcache
|
||||||
|
cache-to: type=registry,ref=${{ env.IMAGE }}:buildcache,mode=max
|
||||||
|
|
||||||
|
- name: Install kustomize
|
||||||
|
run: |
|
||||||
|
curl -sL "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
|
||||||
|
sudo mv kustomize /usr/local/bin/kustomize
|
||||||
|
|
||||||
|
- name: Pin image tag in deploy manifests
|
||||||
|
run: |
|
||||||
|
cd deploy
|
||||||
|
kustomize edit set image solitaire-server=${{ env.IMAGE }}:${{ steps.meta.outputs.sha }}
|
||||||
|
|
||||||
|
- name: Commit and push updated kustomization
|
||||||
|
run: |
|
||||||
|
git config user.email "ci@gitea.local"
|
||||||
|
git config user.name "Gitea CI"
|
||||||
|
git add deploy/kustomization.yaml
|
||||||
|
git commit -m "chore(deploy): bump image to ${{ steps.meta.outputs.sha }} [skip ci]" || true
|
||||||
|
git pull --rebase origin master
|
||||||
|
git push
|
||||||
@@ -14,4 +14,10 @@ data/
|
|||||||
# Android signing keystores — never commit
|
# Android signing keystores — never commit
|
||||||
*.jks
|
*.jks
|
||||||
*.jks.bak
|
*.jks.bak
|
||||||
|
*.jks.bak*
|
||||||
*.keystore
|
*.keystore
|
||||||
|
|
||||||
|
# Kubernetes secrets — apply manually, never commit
|
||||||
|
deploy/matomo-secret.yaml
|
||||||
|
deploy/*-secret.yaml
|
||||||
|
deploy/*-auth-secret.yaml
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE leaderboard\n SET best_score = ?,\n best_time_secs = ?,\n recorded_at = ?\n WHERE user_id = ?\n AND (\n best_score IS NULL\n OR ? > best_score\n OR (? = best_score AND (best_time_secs IS NULL OR ? < best_time_secs))\n )",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 7
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "0e199cafab7e71b0c7f28ede85a622e38649d2fe5a73a5c715f2319f5450f729"
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"db_name": "SQLite",
|
"db_name": "SQLite",
|
||||||
"query": "SELECT l.display_name, l.best_score, l.best_time_secs, l.recorded_at\n FROM leaderboard l\n JOIN users u ON u.id = l.user_id\n WHERE u.leaderboard_opt_in = 1\n ORDER BY\n CASE WHEN l.best_score IS NULL THEN 1 ELSE 0 END ASC,\n l.best_score DESC,\n CASE WHEN l.best_time_secs IS NULL THEN 1 ELSE 0 END ASC,\n l.best_time_secs ASC",
|
"query": "SELECT l.display_name, l.best_score, l.best_time_secs, l.recorded_at\n FROM leaderboard l\n JOIN users u ON u.id = l.user_id\n WHERE u.leaderboard_opt_in = 1\n ORDER BY\n CASE WHEN l.best_score IS NULL THEN 1 ELSE 0 END ASC,\n l.best_score DESC,\n CASE WHEN l.best_time_secs IS NULL THEN 1 ELSE 0 END ASC,\n l.best_time_secs ASC\n LIMIT 100",
|
||||||
"describe": {
|
"describe": {
|
||||||
"columns": [
|
"columns": [
|
||||||
{
|
{
|
||||||
@@ -34,5 +34,5 @@
|
|||||||
false
|
false
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"hash": "57c93a6acd7eea44d00412e62f0d3fed7ffbe4cd759353d29f38a8eb37f69112"
|
"hash": "2b814989a6632ca930ae1e895f97a7fc3389c91d1d2abf6900a21fb0d6e94ef3"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "DELETE FROM refresh_tokens WHERE user_id = ?",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "40db0910531d4418d4d58d31f0f8ea3894248406cc016020a6e211ed66da91c0"
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE users SET password_hash = ? WHERE id = ?",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "e4eb622073cbdf868ec1568a6bdb132e962480b0530d542102c05aa9e901463b"
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "INSERT OR IGNORE INTO analytics_events\n (id, user_id, session_id, event_type, payload, client_time, received_at)\n VALUES (?, ?, ?, ?, ?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 7
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "f23630e78ae88e72d7930184f7cd8fc67e71f3930609f1cf14061d35d6de8ec3"
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Solitaire Quest — Architecture Document
|
# Ferrous Solitaire — Architecture Document
|
||||||
|
|
||||||
> **Version:** 1.3
|
> **Version:** 1.3
|
||||||
> **Language:** Rust (Edition 2024)
|
> **Language:** Rust (Edition 2024)
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
## 1. Project Overview
|
## 1. Project Overview
|
||||||
|
|
||||||
Solitaire Quest is a cross-platform Klondike Solitaire game written in Rust, targeting macOS, Windows, and Linux desktops. It features a full progression system with XP, levels, achievements, daily challenges, and an optional self-hosted sync server so statistics and progress are available across all of a player's devices.
|
Ferrous Solitaire is a cross-platform Klondike Solitaire game written in Rust, targeting macOS, Windows, and Linux desktops. It features a full progression system with XP, levels, achievements, daily challenges, and an optional self-hosted sync server so statistics and progress are available across all of a player's devices.
|
||||||
|
|
||||||
### Sync Backend by Platform
|
### Sync Backend by Platform
|
||||||
|
|
||||||
@@ -43,6 +43,7 @@ Solitaire Quest is a cross-platform Klondike Solitaire game written in Rust, tar
|
|||||||
| macOS | Self-hosted server | Full feature set |
|
| macOS | Self-hosted server | Full feature set |
|
||||||
| Windows | Self-hosted server | Full feature set |
|
| Windows | Self-hosted server | Full feature set |
|
||||||
| Linux | Self-hosted server | Full feature set |
|
| Linux | Self-hosted server | Full feature set |
|
||||||
|
| Android | Self-hosted server | Touch input; safe-area insets via JNI; `cargo-apk` build |
|
||||||
|
|
||||||
### Design Principles
|
### Design Principles
|
||||||
|
|
||||||
@@ -322,6 +323,12 @@ struct FontResource(Handle<Font>);
|
|||||||
struct BackgroundImageSet {
|
struct BackgroundImageSet {
|
||||||
handles: Vec<Handle<Image>>, // indices 0–4 match selected_background setting
|
handles: Vec<Handle<Image>>, // indices 0–4 match selected_background setting
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OS-reserved edge insets (physical px); zero on desktop
|
||||||
|
struct SafeAreaInsets { top: f32, bottom: f32, left: f32, right: f32 }
|
||||||
|
|
||||||
|
// Whether the HUD band is visible (auto-hide chrome feature)
|
||||||
|
enum HudVisibility { Visible, Hidden }
|
||||||
```
|
```
|
||||||
|
|
||||||
### Key Bevy Events
|
### Key Bevy Events
|
||||||
@@ -900,7 +907,7 @@ All sound effect WAV files are embedded at compile time via `include_bytes!()` i
|
|||||||
| macOS | Primary | Self-hosted server | x86_64 + Apple Silicon (universal binary via `cargo-lipo`) |
|
| macOS | Primary | Self-hosted server | x86_64 + Apple Silicon (universal binary via `cargo-lipo`) |
|
||||||
| Windows | Primary | Self-hosted server | x86_64, MSVC toolchain |
|
| Windows | Primary | Self-hosted server | x86_64, MSVC toolchain |
|
||||||
| Linux | Primary | Self-hosted server | x86_64, tested on Ubuntu 22.04+ and Fedora 39+ |
|
| Linux | Primary | Self-hosted server | x86_64, tested on Ubuntu 22.04+ and Fedora 39+ |
|
||||||
| Android | Stretch | Self-hosted server | `cargo-mobile2`, touch input |
|
| Android | Active | Self-hosted server | `cargo-apk`; touch + long-press + double-tap; safe-area JNI; portrait layout |
|
||||||
| iOS | Stretch | Self-hosted server | `cargo-mobile2`, touch input |
|
| iOS | Stretch | Self-hosted server | `cargo-mobile2`, touch input |
|
||||||
|
|
||||||
Minimum Bevy window size enforced: 800×600. Desktop windows are freely resizable; layout recomputes on `WindowResized`.
|
Minimum Bevy window size enforced: 800×600. Desktop windows are freely resizable; layout recomputes on `WindowResized`.
|
||||||
|
|||||||
@@ -1,11 +1,32 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
All notable changes to Solitaire Quest are documented here. The format is
|
All notable changes to Ferrous Solitaire are documented here. The format is
|
||||||
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this
|
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this
|
||||||
project follows [Semantic Versioning](https://semver.org/).
|
project follows [Semantic Versioning](https://semver.org/).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **BUG-3: Multi-modal stacking** (`hud_plugin.rs`). `handle_menu_button`
|
||||||
|
now checks `scrims.is_empty()` — a `Query<(), With<ModalScrim>>` guard —
|
||||||
|
before calling `spawn_menu_popover`. Tapping ≡ while any modal (Stats,
|
||||||
|
Settings, Profile, Help) is open is now a no-op. Previously Stats + Profile
|
||||||
|
could be open simultaneously.
|
||||||
|
- **UX-7: Help text single-line overflow** (`help_plugin.rs`). The HUD menu
|
||||||
|
button description "Menu: Stats, Settings, Profile, Achievements" wrapped to
|
||||||
|
two lines on Android. Shortened to "Open menu (Stats, Settings, Profile...)"
|
||||||
|
which fits on one line. Verified on device.
|
||||||
|
- **UX-5b: Home mode glyph corruption** (`home_plugin.rs`). Mode selector icons
|
||||||
|
were using Geometric Shapes block (U+25xx) absent from the bundled FiraMono
|
||||||
|
font — rendered as missing-glyph rectangles on Android. Replaced with card
|
||||||
|
suits (U+2660–2666) which FiraMono covers: ♦ Daily, ♥ Zen, ♠ Challenge.
|
||||||
|
- **UX-1: Modal Done button in gesture zone** (`safe_area.rs`). New
|
||||||
|
`apply_safe_area_to_modal_scrims` Bevy system pads every `ModalScrim` bottom
|
||||||
|
by `SafeAreaInsets.bottom / scale_factor`. Modal cards are now centred over
|
||||||
|
the safe area, not the full physical screen. The Settings / Help / Stats Done
|
||||||
|
buttons are reachable on gesture-nav Android devices. Verified on device.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## [0.23.0] — 2026-05-12
|
## [0.23.0] — 2026-05-12
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# CLAUDE.md
|
# CLAUDE.md
|
||||||
|
|
||||||
version: unified-3.0
|
version: unified-4.0
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -29,8 +29,9 @@ solitaire_sync/ # Shared API + merge logic
|
|||||||
solitaire_data/ # Persistence + sync client
|
solitaire_data/ # Persistence + sync client
|
||||||
solitaire_engine/ # Bevy ECS + UI + gameplay orchestration
|
solitaire_engine/ # Bevy ECS + UI + gameplay orchestration
|
||||||
solitaire_server/ # Axum backend (optional sync layer)
|
solitaire_server/ # Axum backend (optional sync layer)
|
||||||
|
solitaire_wasm/ # WASM bindings for browser-side replay player
|
||||||
solitaire_app/ # Entry binary
|
solitaire_app/ # Entry binary
|
||||||
assets/ # Runtime assets (except audio)
|
assets/ # Runtime assets (except audio + default theme)
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -72,12 +73,16 @@ These override all other instructions.
|
|||||||
|
|
||||||
* NO `unwrap()`
|
* NO `unwrap()`
|
||||||
* NO `panic!()` in runtime/game logic
|
* NO `panic!()` in runtime/game logic
|
||||||
* All state transitions:
|
* Core game state mutations MUST return:
|
||||||
|
|
||||||
```rust id="err_model"
|
```rust id="err_model"
|
||||||
Result<T, MoveError>
|
Result<T, MoveError>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* Engine / UI state changes follow ECS patterns (Resources, Events) —
|
||||||
|
they do not return `MoveError`
|
||||||
|
* Use `thiserror`-derived types for any new error enums outside `solitaire_core`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 2.4 Threading Rules
|
## 2.4 Threading Rules
|
||||||
@@ -126,10 +131,15 @@ trait SyncProvider
|
|||||||
## 3.1 ECS Design
|
## 3.1 ECS Design
|
||||||
|
|
||||||
* systems = single responsibility
|
* systems = single responsibility
|
||||||
* communication = Events only
|
* cross-system communication = Events (fire-and-forget triggers)
|
||||||
* shared state = Resources only
|
* persistent shared state = Resources (polled every frame or on change)
|
||||||
* per-entity state = Components only
|
* per-entity state = Components only
|
||||||
|
|
||||||
|
Events and Resources are both valid communication paths — use Events when
|
||||||
|
the receiver needs to react once; use Resources when the receiver polls
|
||||||
|
or when multiple systems read the same value (e.g. `SafeAreaInsets`,
|
||||||
|
`HudVisibility`, `LayoutResource`).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 3.2 Game State Authority
|
## 3.2 Game State Authority
|
||||||
@@ -149,11 +159,22 @@ Every player action MUST:
|
|||||||
Keyboard shortcuts are:
|
Keyboard shortcuts are:
|
||||||
→ optional accelerators only
|
→ optional accelerators only
|
||||||
|
|
||||||
|
**Exception — UI chrome gestures:**
|
||||||
|
Tap-to-toggle visibility of UI chrome (e.g. auto-hiding HUD band) is
|
||||||
|
permitted without a visible button. The gesture MUST:
|
||||||
|
* affect only chrome visibility, never game state
|
||||||
|
* restore chrome automatically when any modal opens
|
||||||
|
* be purely additive (game remains fully playable with chrome always visible)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 3.4 Layout System
|
## 3.4 Layout System
|
||||||
|
|
||||||
* recompute on `WindowResized`
|
* recompute on `WindowResized`
|
||||||
|
* recompute on `SafeAreaInsets` changed
|
||||||
|
* recompute on `HudVisibility` changed
|
||||||
|
* `compute_layout` MUST accept `hud_visible: bool`; pass `HUD_BAND_HEIGHT`
|
||||||
|
when `true`, `0.0` when `false`
|
||||||
* no fixed resolution assumptions
|
* no fixed resolution assumptions
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -178,11 +199,18 @@ Includes:
|
|||||||
|
|
||||||
## 4.2 Embedded Assets
|
## 4.2 Embedded Assets
|
||||||
|
|
||||||
Only audio:
|
Embed via `include_bytes!()` only when ALL of the following are true:
|
||||||
|
|
||||||
```text id="audio_rule"
|
* the asset is small (< 500 KB uncompressed)
|
||||||
include_bytes!()
|
* it changes rarely (not user-customisable)
|
||||||
```
|
* a missing file would be a hard crash, not a graceful degradation
|
||||||
|
|
||||||
|
Currently embedded:
|
||||||
|
* **Audio** — all `.wav` files in `audio_plugin.rs`
|
||||||
|
* **Default card theme** — shipped via `embedded://` scheme in `ThemePlugin`
|
||||||
|
|
||||||
|
Do NOT embed card face PNGs, background images, or user fonts —
|
||||||
|
these are loaded via `AssetServer` so art can be swapped without recompile.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -210,7 +238,9 @@ Must degrade gracefully under `MinimalPlugins`.
|
|||||||
## 5.2 Public API Rules
|
## 5.2 Public API Rules
|
||||||
|
|
||||||
* prefer `Into<T>` over concrete types
|
* prefer `Into<T>` over concrete types
|
||||||
* all public items require doc comments
|
* publicly exported functions, traits, and non-trivial types require doc comments
|
||||||
|
* simple marker components, newtype wrappers, and internal `pub` items
|
||||||
|
used only within the same crate are exempt from doc comment requirements
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -276,11 +306,13 @@ NEVER commit otherwise
|
|||||||
|
|
||||||
Claude must request confirmation before:
|
Claude must request confirmation before:
|
||||||
|
|
||||||
* adding dependencies
|
* adding dependencies to `solitaire_core` or `solitaire_sync`
|
||||||
* modifying `solitaire_sync`
|
(engine/server crates may add deps without confirmation)
|
||||||
* changing DB schema
|
* modifying `solitaire_sync` types or the `SyncProvider` trait
|
||||||
|
* changing DB schema (migrations are append-only)
|
||||||
* introducing `unsafe`
|
* introducing `unsafe`
|
||||||
* changing merge strategy
|
* changing the merge strategy in `solitaire_sync::merge`
|
||||||
|
* changing the `SyncPayload` wire format (breaking change for existing servers)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -304,10 +336,29 @@ Core is always the source of truth.
|
|||||||
|
|
||||||
Must always be handled explicitly:
|
Must always be handled explicitly:
|
||||||
|
|
||||||
|
**All platforms**
|
||||||
* Bevy `Time` uses `f32`
|
* Bevy `Time` uses `f32`
|
||||||
* `sqlx::migrate!()` path is crate-relative
|
* `sqlx::migrate!()` path is crate-relative
|
||||||
* `dirs::data_dir()` may return `None`
|
* `dirs::data_dir()` may return `None`
|
||||||
* Linux may lack keyring backend
|
* Linux may lack keyring backend — handle `keyring::Error` gracefully
|
||||||
|
|
||||||
|
**Android (active target — not stretch)**
|
||||||
|
* Safe-area insets arrive in frames 1–3 via JNI polling, not at startup;
|
||||||
|
UI that depends on them must handle the zero-inset initial state
|
||||||
|
* Physical pixels ≠ logical pixels: `SafeAreaInsets` values are physical
|
||||||
|
(from `WindowInsets` API); divide by `window.scale_factor()` before
|
||||||
|
passing to Bevy `Val::Px`
|
||||||
|
* `adb shell input tap` uses physical pixel coordinates
|
||||||
|
* FiraMono (bundled font) covers: ASCII, card suits U+2660–2666,
|
||||||
|
Arrows U+2190–21FF. It does NOT cover Geometric Shapes (U+25xx) —
|
||||||
|
those render as missing-glyph rectangles on Android
|
||||||
|
* The gesture/navigation bar at the bottom (≈132px physical on common
|
||||||
|
devices) is inside the Bevy viewport; use `SafeAreaInsets.bottom` to
|
||||||
|
avoid placing interactive elements in that zone
|
||||||
|
* `HUD_BAND_HEIGHT` is 128px on Android (two-row wrap) vs 64px on desktop;
|
||||||
|
layout constants are `#[cfg(target_os = "android")]` gated
|
||||||
|
* JNI calls must use `attach_current_thread_permanently` — not
|
||||||
|
`attach_current_thread` — to avoid detach-on-drop panics
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -318,6 +369,12 @@ Must always be handled explicitly:
|
|||||||
* blocking async calls in ECS
|
* blocking async calls in ECS
|
||||||
* insecure credential storage
|
* insecure credential storage
|
||||||
* bypassing core logic layer
|
* bypassing core logic layer
|
||||||
|
* hardcoded pixel coordinates in layout — always derive from `compute_layout`
|
||||||
|
* Unicode Geometric Shapes block (U+25xx) in UI text — not in FiraMono
|
||||||
|
* spawning a second `ModalScrim` while one already exists without first
|
||||||
|
dismissing the existing one (use `scrims.is_empty()` guard)
|
||||||
|
* reading `SafeAreaInsets` physical values directly into `Val::Px` without
|
||||||
|
dividing by `window.scale_factor()`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -345,9 +402,74 @@ If unclear:
|
|||||||
| Both combined | full system understanding |
|
| Both combined | full system understanding |
|
||||||
|
|
||||||
---
|
---
|
||||||
# 14. Context Injection System (AUTOMATIC SCOPE FILTER)
|
# 14. Modal System Conventions
|
||||||
|
|
||||||
## 14.1 Purpose
|
All full-screen overlay panels MUST use the `spawn_modal` / `ModalScrim` pattern
|
||||||
|
from `solitaire_engine::ui_modal`.
|
||||||
|
|
||||||
|
## 14.1 Spawn pattern
|
||||||
|
|
||||||
|
```rust
|
||||||
|
let scrim = spawn_modal(commands, MyScreenMarker, Z_MODAL_PANEL, |card| {
|
||||||
|
spawn_modal_header(card, "Title", font_res);
|
||||||
|
// ... body nodes ...
|
||||||
|
spawn_modal_actions(card, |actions| {
|
||||||
|
spawn_modal_button(actions, MyCloseButton, "Done", None,
|
||||||
|
ButtonVariant::Primary, font_res);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// Optional: allow clicking the scrim outside the card to dismiss
|
||||||
|
commands.entity(scrim).insert(ScrimDismissible);
|
||||||
|
```
|
||||||
|
|
||||||
|
## 14.2 Guard rule
|
||||||
|
|
||||||
|
Before spawning a new modal, check `scrims: Query<(), With<ModalScrim>>`
|
||||||
|
and return early if `!scrims.is_empty()` — unless the new modal is
|
||||||
|
explicitly replacing the current one (despawn first, then spawn).
|
||||||
|
|
||||||
|
## 14.3 Safe area
|
||||||
|
|
||||||
|
Every `ModalScrim` automatically receives `padding.bottom` equal to the
|
||||||
|
logical gesture-bar height via `apply_safe_area_to_modal_scrims` in
|
||||||
|
`SafeAreaInsetsPlugin`. Do not manually add bottom padding to scrim nodes.
|
||||||
|
|
||||||
|
## 14.4 Z-ordering
|
||||||
|
|
||||||
|
Use `Z_MODAL_PANEL` from `ui_theme` for all modal scrims. Do not use
|
||||||
|
raw `z_index` values — they drift and cause ordering bugs.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 15. Android Build & Verification
|
||||||
|
|
||||||
|
## 15.1 Build command
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo apk build --package solitaire_app --lib
|
||||||
|
adb install -r target/debug/apk/solitaire-quest.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
## 15.2 Coordinate system reminder
|
||||||
|
|
||||||
|
Device physical: 1080×2400. Bevy logical: 900×2000. Scale factor: 1.20.
|
||||||
|
`adb shell input tap X Y` takes PHYSICAL coordinates.
|
||||||
|
To convert from what you see on screen (logical): multiply by 1.20.
|
||||||
|
|
||||||
|
## 15.3 Android-specific test checklist
|
||||||
|
|
||||||
|
Before shipping any Android build:
|
||||||
|
- [ ] Safe area insets arrive and shift HUD correctly (check after 3s)
|
||||||
|
- [ ] All modal Done buttons are above the gesture bar
|
||||||
|
- [ ] No Geometric Shapes glyphs in UI text
|
||||||
|
- [ ] HUD band does not overlap the top status bar
|
||||||
|
- [ ] Touch drag-and-drop works on all pile types
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 16. Context Injection System (AUTOMATIC SCOPE FILTER)
|
||||||
|
|
||||||
|
## 16.1 Purpose
|
||||||
|
|
||||||
Before generating any response, Claude MUST construct a **minimal relevant context set**.
|
Before generating any response, Claude MUST construct a **minimal relevant context set**.
|
||||||
|
|
||||||
@@ -360,7 +482,7 @@ This prevents:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 14.2 Input Classification Step (MANDATORY)
|
## 16.2 Input Classification Step (MANDATORY)
|
||||||
|
|
||||||
Every request MUST be classified into exactly one task type:
|
Every request MUST be classified into exactly one task type:
|
||||||
|
|
||||||
@@ -381,13 +503,13 @@ If uncertain → ask clarification.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 14.3 Context Selection Engine
|
## 16.3 Context Selection Engine
|
||||||
|
|
||||||
After classification, Claude MUST include ONLY the relevant sections below.
|
After classification, Claude MUST include ONLY the relevant sections below.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 14.4 Context Map (CORE RULESET)
|
## 16.4 Context Map (CORE RULESET)
|
||||||
|
|
||||||
### feature
|
### feature
|
||||||
|
|
||||||
@@ -495,7 +617,7 @@ Include:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 14.5 Context Compression Rules
|
## 16.5 Context Compression Rules
|
||||||
|
|
||||||
Claude MUST obey:
|
Claude MUST obey:
|
||||||
|
|
||||||
@@ -506,7 +628,7 @@ Claude MUST obey:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 14.6 Context Priority Order
|
## 16.6 Context Priority Order
|
||||||
|
|
||||||
When space is limited:
|
When space is limited:
|
||||||
|
|
||||||
@@ -517,7 +639,7 @@ When space is limited:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 14.7 “No Context Pollution” Rule
|
## 16.7 “No Context Pollution” Rule
|
||||||
|
|
||||||
Claude must NOT include:
|
Claude must NOT include:
|
||||||
|
|
||||||
@@ -529,7 +651,7 @@ Claude must NOT include:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 14.8 Self-Check Before Execution
|
## 16.8 Self-Check Before Execution
|
||||||
|
|
||||||
Before writing code, Claude MUST verify:
|
Before writing code, Claude MUST verify:
|
||||||
|
|
||||||
@@ -542,7 +664,7 @@ If any fail → revise context selection.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 14.9 Injection Output Format (Internal Model)
|
## 16.9 Injection Output Format (Internal Model)
|
||||||
|
|
||||||
Claude should behave as if it constructed:
|
Claude should behave as if it constructed:
|
||||||
|
|
||||||
@@ -560,7 +682,7 @@ Claude should behave as if it constructed:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 14.10 Relationship to ARCHITECTURE.md
|
## 16.10 Relationship to ARCHITECTURE.md
|
||||||
|
|
||||||
* ARCHITECTURE.md = source of truth
|
* ARCHITECTURE.md = source of truth
|
||||||
* CLAUDE.md = execution constraints
|
* CLAUDE.md = execution constraints
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ You must follow CLAUDE_SPEC.md strictly.
|
|||||||
Rules:
|
Rules:
|
||||||
- Do not expand scope beyond what is defined
|
- Do not expand scope beyond what is defined
|
||||||
- Do not refactor unrelated code
|
- Do not refactor unrelated code
|
||||||
- Do not introduce new dependencies
|
- Do not introduce new dependencies to solitaire_core or solitaire_sync without confirmation
|
||||||
- Prefer minimal, surgical changes
|
- Prefer minimal, surgical changes
|
||||||
- Use existing patterns in the codebase
|
- Use existing patterns in the codebase
|
||||||
- Return minimal diffs or changed functions only
|
- Return minimal diffs or changed functions only
|
||||||
@@ -360,7 +360,7 @@ notes:
|
|||||||
target:
|
target:
|
||||||
"<what is slow>"
|
"<what is slow>"
|
||||||
|
|
||||||
constraints:CLAUDE_WORKFLOW.md
|
constraints:
|
||||||
- no behavior change
|
- no behavior change
|
||||||
- no architecture change
|
- no architecture change
|
||||||
- minimal code changes
|
- minimal code changes
|
||||||
|
|||||||
@@ -41,6 +41,10 @@ solitaire_server:
|
|||||||
depends_on: [solitaire_sync, axum, sqlx, jsonwebtoken]
|
depends_on: [solitaire_sync, axum, sqlx, jsonwebtoken]
|
||||||
role: "backend"
|
role: "backend"
|
||||||
|
|
||||||
|
solitaire_wasm:
|
||||||
|
depends_on: [solitaire_core, wasm-bindgen, serde-wasm-bindgen]
|
||||||
|
role: "wasm_replay_player"
|
||||||
|
|
||||||
solitaire_app:
|
solitaire_app:
|
||||||
depends_on: [solitaire_engine]
|
depends_on: [solitaire_engine]
|
||||||
role: "entrypoint"
|
role: "entrypoint"
|
||||||
@@ -180,7 +184,7 @@ threading:
|
|||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
pattern: "feature_isolation"
|
pattern: "feature_isolation"
|
||||||
communication: "events"
|
communication: "events and resources"
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Credits
|
# Credits
|
||||||
|
|
||||||
Solitaire Quest is MIT-licensed (see [LICENSE](LICENSE)). It is built on top of
|
Ferrous Solitaire is MIT-licensed (see [LICENSE](LICENSE)). It is built on top of
|
||||||
the work of many open-source projects and a small handful of third-party
|
the work of many open-source projects and a small handful of third-party
|
||||||
assets. This file lists every component that ships in the binary or in the
|
assets. This file lists every component that ships in the binary or in the
|
||||||
`assets/` directory.
|
`assets/` directory.
|
||||||
@@ -43,7 +43,7 @@ copyleft code is statically linked into the game binary.
|
|||||||
| File(s) | Source | License |
|
| File(s) | Source | License |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `solitaire_engine/assets/themes/default/{suit}_{rank}.svg` (52 SVGs) | [hayeah/playing-cards-assets](https://github.com/hayeah/playing-cards-assets) | MIT |
|
| `solitaire_engine/assets/themes/default/{suit}_{rank}.svg` (52 SVGs) | [hayeah/playing-cards-assets](https://github.com/hayeah/playing-cards-assets) | MIT |
|
||||||
| `solitaire_engine/assets/themes/default/back.svg` | Original — Solitaire Quest | MIT (this project) |
|
| `solitaire_engine/assets/themes/default/back.svg` | Original — Ferrous Solitaire | MIT (this project) |
|
||||||
| `assets/cards/faces/{RANK}{SUIT}.png` (52 PNGs) | Pre-rendered from the same `playing-cards-assets` SVGs | MIT (passed through from hayeah) |
|
| `assets/cards/faces/{RANK}{SUIT}.png` (52 PNGs) | Pre-rendered from the same `playing-cards-assets` SVGs | MIT (passed through from hayeah) |
|
||||||
| `assets/cards/backs/back_0.png` – `back_4.png` | Original — generated by `solitaire_assetgen::gen_art` | MIT (this project) |
|
| `assets/cards/backs/back_0.png` – `back_4.png` | Original — generated by `solitaire_assetgen::gen_art` | MIT (this project) |
|
||||||
|
|
||||||
@@ -107,6 +107,6 @@ Audio files are MIT-licensed alongside the rest of this project.
|
|||||||
backs, every audio file) are original work covered by this project's MIT
|
backs, every audio file) are original work covered by this project's MIT
|
||||||
license.
|
license.
|
||||||
|
|
||||||
If you redistribute Solitaire Quest, you must ship this `CREDITS.md` and the
|
If you redistribute Ferrous Solitaire, you must ship this `CREDITS.md` and the
|
||||||
`LICENSE` file alongside the binary so the MIT (project + hayeah card art)
|
`LICENSE` file alongside the binary so the MIT (project + hayeah card art)
|
||||||
and OFL (FiraMono) notices remain visible to end users.
|
and OFL (FiraMono) notices remain visible to end users.
|
||||||
|
|||||||
@@ -7018,6 +7018,7 @@ dependencies = [
|
|||||||
"resvg",
|
"resvg",
|
||||||
"ron",
|
"ron",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_json",
|
||||||
"solitaire_core",
|
"solitaire_core",
|
||||||
"solitaire_data",
|
"solitaire_data",
|
||||||
"solitaire_sync",
|
"solitaire_sync",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Solitaire Quest
|
# Ferrous Solitaire
|
||||||
|
|
||||||
A cross-platform Klondike Solitaire game written in Rust, with a card-theme
|
A cross-platform Klondike Solitaire game written in Rust, with a card-theme
|
||||||
system, full progression (XP / levels / achievements / daily challenges), and
|
system, full progression (XP / levels / achievements / daily challenges), and
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Solitaire Quest — Self-Hosting Guide
|
# Ferrous Solitaire — Self-Hosting Guide
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@@ -42,3 +42,29 @@ git pull
|
|||||||
docker compose build
|
docker compose build
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Admin — Password Reset
|
||||||
|
|
||||||
|
If a player loses access to their account, the server binary includes a
|
||||||
|
built-in password reset command. Run it on the host (or inside the container)
|
||||||
|
with `DATABASE_URL` pointing at your database:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Interactive (prompts for the new password):
|
||||||
|
DATABASE_URL=sqlite://./data/solitaire.db \
|
||||||
|
./solitaire_server --reset-password <username>
|
||||||
|
|
||||||
|
# Non-interactive (piped from a script or password manager):
|
||||||
|
echo "new_password" | \
|
||||||
|
DATABASE_URL=sqlite://./data/solitaire.db \
|
||||||
|
./solitaire_server --reset-password <username>
|
||||||
|
|
||||||
|
# Inside a running Docker container:
|
||||||
|
docker compose exec server sh -c \
|
||||||
|
'echo "new_password" | ./solitaire_server --reset-password alice'
|
||||||
|
```
|
||||||
|
|
||||||
|
On success the user's `password_hash` is updated and **all active refresh
|
||||||
|
tokens are deleted**, so every open session must log in again with the new
|
||||||
|
password. `JWT_SECRET` does not need to be set for this command.
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Solitaire Quest — Session Handoff
|
# Ferrous Solitaire — Session Handoff
|
||||||
|
|
||||||
**Last updated:** 2026-05-12 — ARCHITECTURE.md updated to v1.3 (all 8 Phase 8 gaps closed);
|
**Last updated:** 2026-05-12 — Leaderboard display name shipped (`03be4fc`). All commits pushed to origin.
|
||||||
`SESSION_HANDOFF.md` updated. Push pending.
|
|
||||||
|
|
||||||
Phase 8 closes the self-hosted-server connection arc end-to-end: login/register
|
Phase 8 closes the self-hosted-server connection arc end-to-end: login/register
|
||||||
modal, re-auth on token expiry, account deletion flow, server deployment
|
modal, re-auth on token expiry, account deletion flow, server deployment
|
||||||
@@ -13,9 +12,9 @@ and full server integration tests.
|
|||||||
|
|
||||||
## Current state
|
## Current state
|
||||||
|
|
||||||
- **HEAD locally:** `bd388fe` (docs: CHANGELOG Phase 8 entry).
|
- **HEAD locally:** `03be4fc` (feat: leaderboard custom display name).
|
||||||
- **HEAD on origin:** `272d31f` (feat: account deletion — last pushed commit).
|
- **HEAD on origin:** `03be4fc` (fully pushed).
|
||||||
- **Working tree:** `ARCHITECTURE.md` + `SESSION_HANDOFF.md` modified, uncommitted.
|
- **Working tree:** clean (only `solitaire-release.jks.bak2` untracked — intentional).
|
||||||
- **Build:** `cargo clippy --workspace --all-targets -- -D warnings` clean.
|
- **Build:** `cargo clippy --workspace --all-targets -- -D warnings` clean.
|
||||||
- **Tests:** **1300+ passing / 0 failing** across the workspace.
|
- **Tests:** **1300+ passing / 0 failing** across the workspace.
|
||||||
- **Tags on origin:** `v0.9.0` through `v0.22.0`.
|
- **Tags on origin:** `v0.9.0` through `v0.22.0`.
|
||||||
@@ -50,54 +49,70 @@ Also shipped (pre-Phase 8 but post-v0.22.0, already in CHANGELOG):
|
|||||||
- [x] SESSION_HANDOFF.md update — this file
|
- [x] SESSION_HANDOFF.md update — this file
|
||||||
|
|
||||||
### 2. Leaderboard wiring gaps
|
### 2. Leaderboard wiring gaps
|
||||||
- **Best-score auto-post missing.** `POST /api/sync/push` merges stats/achievements/
|
- [x] **Best-score auto-post.** Done (`303c78a`): `update_leaderboard_if_opted_in`
|
||||||
progress but never touches the `leaderboard` table. Players who opt in never
|
called from both first-push and merge paths in `sync.rs`; uses SQLite `MIN`/`MAX`
|
||||||
have their `best_time_secs` / `best_score` updated automatically. Fix: update
|
in the UPDATE so scores never regress on stale data.
|
||||||
the leaderboard row inside the server's sync push handler (or on `GameWonEvent`
|
- [x] **Display name = username.** Done (`03be4fc`): `leaderboard_display_name:
|
||||||
via a new async task in `sync_plugin`).
|
Option<String>` added to `Settings`; editor modal in leaderboard panel; persists
|
||||||
- **Display name = username.** `handle_opt_in_button` uses the `SyncBackend`
|
to `settings.json`; `handle_opt_in_button` prefers custom name over username.
|
||||||
username as the leaderboard display name. Consider adding
|
|
||||||
`leaderboard_display_name: Option<String>` to `Settings` for players who
|
|
||||||
want a different public identity.
|
|
||||||
|
|
||||||
### 3. Security hardening
|
### 3. Security hardening
|
||||||
- **Refresh token rotation.** `POST /api/auth/refresh` returns only a new
|
- [x] **Refresh token rotation.** Done (`b129664`): `refresh_tokens` table
|
||||||
access token; the refresh token never rotates. Standard mitigation: issue a
|
(migration 003); jti embedded in JWT; rotate-on-use pattern; 3 integration
|
||||||
new refresh token on each call and invalidate the old one (needs a
|
tests.
|
||||||
`last_refresh_token` column or a separate table).
|
- [x] **Sync endpoint rate limiting.** Done (`6e6f3ef`): `UserIdKeyExtractor`
|
||||||
- **Sync endpoint rate limiting.** Only `/api/auth/*` has `tower-governor`;
|
decodes JWT for per-user identity; falls back to IP; burst 10 / 6 min
|
||||||
`/api/sync/push` (1 MB body) has no per-user throttle.
|
steady-state; integration test passes.
|
||||||
|
|
||||||
### 4. Android validation
|
### 4. Android validation
|
||||||
- **Android Keystore functional test** — JNI AES-GCM code ships (`f281425`) but
|
- [x] **Android Keystore functional test.** Done (2026-05-11, Pixel 7 AVD,
|
||||||
no AVD round-trip test has been run. Required before Phase 8 sync goes live on
|
Android 14): `load_access_token()` exercised via `start_pull`; logcat confirmed
|
||||||
Android.
|
`NotFound` returned cleanly — no JNI panic. See `docs/android/PLAYABILITY_TODO.md` P4.
|
||||||
- **JNI clipboard functional test** — same status (`2c822ba`). Note: `adb tap`
|
- [x] **JNI clipboard functional test.** Done (2026-05-11): temporary `KEYCODE_C`
|
||||||
doesn't work in headless AVD (see memory); requires a touch-gesture path.
|
hook confirmed `ClipboardManager.setPrimaryClip()` succeeds on Android 14.
|
||||||
- **`cargo apk build --lib` noisy stderr** — post-sign panic doesn't affect the
|
Hook reverted. Production path requires Interaction::Pressed + non-null `share_url`.
|
||||||
APK but pollutes CI output. Document `--lib` as canonical or upstream a fix.
|
Note: `adb shell input tap` doesn't deliver touch events on headless AVD (documented).
|
||||||
|
- [x] **`cargo apk build --lib` noisy stderr** — upstream cargo-apk bug; `--lib`
|
||||||
|
is the canonical command (CLAUDE.md §15.1, docs/ANDROID.md). No in-repo fix possible.
|
||||||
|
|
||||||
### 5. Feature completeness
|
### 5. Feature completeness
|
||||||
- **Theme importer UI.** `import_theme()` (Phase 7, `theme/importer.rs`) is
|
- [x] **Theme importer UI.** Done (`613bbf8`): "Scan for new themes" button in
|
||||||
complete but has no Settings button trigger. Players must copy theme files
|
Settings Appearance section. Shows import path label, scans user_theme_dir()
|
||||||
manually.
|
for .zip archives, fires InfoToastEvent per file, refreshes ThemeRegistry.
|
||||||
- **`mirror_achievement` decision.** `SyncProvider` has this method with a
|
- [x] **`mirror_achievement` removed.** Done (`549a817`): method was a no-op
|
||||||
no-op default; `SolitaireServerClient` never overrides it, no server endpoint
|
default never overridden and never called; achievements already sync via
|
||||||
exists. Either implement (`POST /api/achievements/mirror` + client call on
|
`SyncPayload` push. Deleted from trait and blanket impl.
|
||||||
`AchievementUnlockedEvent`) or delete from the trait.
|
- [x] **WASM build script.** Done (`40d0712`): `build_wasm.sh` at repo root
|
||||||
- **WASM build script.** `web/pkg/` contains compiled WASM committed to git.
|
documents `wasm-pack build --target web`, cleans up pkg metadata files,
|
||||||
Need a `build_wasm.sh` or Makefile target documenting the `wasm-pack build`
|
includes dependency guard + install instructions.
|
||||||
invocation to regenerate it.
|
- [x] **Server password reset.** Done (`7514684`): `--reset-password <username>`
|
||||||
- **Server password reset.** No admin endpoint or CLI tool for resetting a
|
subcommand reads new password from stdin, bcrypt-hashes it, invalidates all
|
||||||
user's password. Self-hosters have no recovery path short of direct SQLite
|
active sessions for the user.
|
||||||
edits.
|
|
||||||
|
### 5b. Android UX polish (2026-05-12)
|
||||||
|
|
||||||
|
- [x] **UX-1 — Modal Done button in gesture zone.** `apply_safe_area_to_modal_scrims` system
|
||||||
|
added to `SafeAreaInsetsPlugin` (`safe_area.rs`). Pads every `ModalScrim` bottom by
|
||||||
|
`insets.bottom / scale`. Fires on resource change + `Added<ModalScrim>`. Verified on device.
|
||||||
|
- [x] **UX-5b — Home mode glyph corruption.** Geometric Shapes (U+25xx, absent from FiraMono)
|
||||||
|
replaced with card suits U+2660–2666 in `home_plugin.rs`. Affects Zen/Challenge/Daily mode
|
||||||
|
selector buttons at level 5+.
|
||||||
|
- [x] **UX-7 — Help text wrap.** Android HUD entry shortened to
|
||||||
|
`"Open menu (Stats, Settings, Profile...)"` in `help_plugin.rs` — fits one line.
|
||||||
|
- [x] **BUG-3 — Multi-modal stacking.** `handle_menu_button` now checks
|
||||||
|
`scrims: Query<(), With<ModalScrim>>` and guards `spawn_menu_popover` with `scrims.is_empty()`.
|
||||||
|
Verified on device: ≡ tap while Stats open does nothing.
|
||||||
|
|
||||||
|
**Note:** These 4 fixes are implemented and verified but not yet committed.
|
||||||
|
|
||||||
### 6. Testing gaps
|
### 6. Testing gaps
|
||||||
- **Server 401 → refresh → retry path** — the `pull`/`push` retry logic in
|
- [x] **Server 401 → refresh → retry path.** Done (`198df75`): both
|
||||||
`SolitaireServerClient` has no integration test.
|
`jwt_refresh_on_401_succeeds` (pull) and
|
||||||
- **WASM winning-replay step-through** — current tests cover 2 stock clicks;
|
`push_retries_after_401_on_expired_access_token` (push) in
|
||||||
a test stepping through a full winning sequence would catch
|
`solitaire_data/tests/sync_round_trip.rs`.
|
||||||
`GameState`/`ReplayMove` compatibility regressions.
|
- [x] **WASM winning-replay step-through.** Done (`b4ada2a`): greedy solver
|
||||||
|
searches seeds 1–200 at test time; steps every move through `ReplayPlayer`;
|
||||||
|
asserts `is_won = true` on the final `StateSnapshot`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -135,28 +150,28 @@ Items missing from the doc:
|
|||||||
## Resume prompt
|
## Resume prompt
|
||||||
|
|
||||||
```
|
```
|
||||||
You are a senior Rust + Bevy developer working on Solitaire Quest.
|
You are a senior Rust + Bevy developer working on Ferrous Solitaire.
|
||||||
Working directory: <Rusty_Solitaire clone path>.
|
Working directory: <Rusty_Solitaire clone path>.
|
||||||
Branch: master. v0.23.0 is the current version (HEAD locally: bd388fe).
|
Branch: master. v0.23.0 is the current version (HEAD: 03be4fc). Fully pushed.
|
||||||
Phase 8 sync is fully shipped. ARCHITECTURE.md is now v1.3 (all Phase 8 gaps closed).
|
|
||||||
Push to origin pending (bd388fe + ARCHITECTURE.md + SESSION_HANDOFF.md commits).
|
|
||||||
|
|
||||||
READ FIRST (in order):
|
READ FIRST (in order):
|
||||||
1. SESSION_HANDOFF.md — this file
|
1. SESSION_HANDOFF.md — this file
|
||||||
2. CHANGELOG.md — [0.23.0] section has the full Phase 8 detail
|
2. CHANGELOG.md — [0.23.0] section has full Phase 8 detail
|
||||||
3. CLAUDE.md — unified-3.0 rule set
|
3. CLAUDE.md — unified-4.0 rule set
|
||||||
4. ARCHITECTURE.md — v1.3, fully up to date
|
4. ARCHITECTURE.md — v1.3, fully up to date
|
||||||
5. docs/ui-mockups/ — design system + mockup library
|
5. docs/ui-mockups/ — design system + mockup library
|
||||||
6. docs/android/ — Android setup + build runbook
|
6. docs/android/ — Android setup + build runbook
|
||||||
7. ~/.claude/projects/<this-project>/memory/MEMORY.md
|
7. ~/.claude/projects/<this-project>/memory/MEMORY.md
|
||||||
|
|
||||||
OPEN WORK (in priority order):
|
OPEN WORK:
|
||||||
B. Leaderboard best-score auto-post (server sync handler + optional
|
Phase 8 punch list is fully closed. All items verified complete.
|
||||||
GameWonEvent path in sync_plugin)
|
Remaining nuisance: `cargo apk build --lib` noisy stderr (cosmetic, non-blocking).
|
||||||
C. Refresh token rotation (server auth handler + new column/table)
|
|
||||||
D. Android AVD functional tests (Keystore + clipboard)
|
|
||||||
E. Theme importer UI button in Settings
|
|
||||||
F. mirror_achievement: decide + implement or remove from trait
|
|
||||||
|
|
||||||
Ask which to start. All are independent; any is a valid next arc.
|
4 Android UX fixes are implemented and verified but NOT YET COMMITTED:
|
||||||
|
- BUG-3 (hud_plugin.rs): multi-modal stacking guard
|
||||||
|
- UX-7 (help_plugin.rs): help text wrap on Android
|
||||||
|
- UX-5b (home_plugin.rs): FiraMono glyph corruption in mode selector
|
||||||
|
- UX-1 (safe_area.rs): modal Done button in gesture zone
|
||||||
|
|
||||||
|
Commit those first, then suggest Phase 9 planning.
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: solitaire-server
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://git.aleshym.co/funman300/Rusty_Solitare.git
|
||||||
|
targetRevision: master
|
||||||
|
path: deploy
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: solitaire
|
||||||
|
# Secrets are applied manually and must not be pruned by ArgoCD.
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: ""
|
||||||
|
kind: Secret
|
||||||
|
name: matomo-secret
|
||||||
|
namespace: solitaire
|
||||||
|
jsonPointers:
|
||||||
|
- /data
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Rebuild the solitaire_wasm crate and install the output into
|
||||||
|
# solitaire_server/web/pkg/ so the server can serve the replay viewer.
|
||||||
|
#
|
||||||
|
# Prerequisites:
|
||||||
|
# cargo install wasm-pack
|
||||||
|
# rustup target add wasm32-unknown-unknown
|
||||||
|
#
|
||||||
|
# Run from the repo root:
|
||||||
|
# ./build_wasm.sh
|
||||||
|
#
|
||||||
|
# The generated files (solitaire_wasm.js + solitaire_wasm_bg.wasm) are
|
||||||
|
# committed to git so self-hosters who don't touch the WASM crate can
|
||||||
|
# skip this step. Regenerate after any change to solitaire_wasm/ or
|
||||||
|
# solitaire_core/.
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
OUT_DIR="$REPO_ROOT/solitaire_server/web/pkg"
|
||||||
|
|
||||||
|
if ! command -v wasm-pack &> /dev/null; then
|
||||||
|
echo "error: wasm-pack not found." >&2
|
||||||
|
echo " Install with: cargo install wasm-pack" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building solitaire_wasm (target: web)..."
|
||||||
|
wasm-pack build \
|
||||||
|
--target web \
|
||||||
|
--out-dir "$OUT_DIR" \
|
||||||
|
--no-typescript \
|
||||||
|
"$REPO_ROOT/solitaire_wasm"
|
||||||
|
|
||||||
|
# wasm-pack writes a package.json and .gitignore into the output dir.
|
||||||
|
# Remove them — we manage the output directory ourselves.
|
||||||
|
rm -f "$OUT_DIR/package.json" "$OUT_DIR/.gitignore"
|
||||||
|
|
||||||
|
echo "Done. Output:"
|
||||||
|
ls -lh "$OUT_DIR"
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: solitaire-server
|
||||||
|
namespace: solitaire
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: solitaire-server
|
||||||
|
# SQLite is single-writer; Recreate avoids two pods owning the PVC at once.
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: solitaire-server
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: gitea-registry
|
||||||
|
containers:
|
||||||
|
- name: server
|
||||||
|
image: solitaire-server
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: DATABASE_URL
|
||||||
|
value: sqlite:///data/sol.db
|
||||||
|
- name: JWT_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: solitaire-secrets
|
||||||
|
key: jwt-secret
|
||||||
|
- name: SERVER_PORT
|
||||||
|
value: "8080"
|
||||||
|
volumeMounts:
|
||||||
|
- name: db-data
|
||||||
|
mountPath: /data
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 30
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 3
|
||||||
|
periodSeconds: 10
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 256Mi
|
||||||
|
volumes:
|
||||||
|
- name: db-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: solitaire-db
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: solitaire-analytics
|
||||||
|
namespace: solitaire
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
|
rules:
|
||||||
|
- host: analytics.aleshym.co
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: matomo
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- analytics.aleshym.co
|
||||||
|
secretName: analytics-tls
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: solitaire-server
|
||||||
|
namespace: solitaire
|
||||||
|
annotations:
|
||||||
|
# Remove the next two lines if you are not using cert-manager.
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
|
rules:
|
||||||
|
- host: klondike.aleshym.co
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: solitaire-server
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
# Remove the tls block if you are not using cert-manager.
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- klondike.aleshym.co
|
||||||
|
secretName: solitaire-tls
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- pvc.yaml
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
- mariadb-pvc.yaml
|
||||||
|
- mariadb-deployment.yaml
|
||||||
|
- mariadb-service.yaml
|
||||||
|
- matomo-pvc.yaml
|
||||||
|
- matomo-deployment.yaml
|
||||||
|
- matomo-service.yaml
|
||||||
|
- ingress-analytics.yaml
|
||||||
|
|
||||||
|
# CI updates this block automatically via `kustomize edit set image`.
|
||||||
|
# The image name here matches the `image: solitaire-server` stub in deployment.yaml.
|
||||||
|
images:
|
||||||
|
- name: solitaire-server
|
||||||
|
newName: git.aleshym.co/funman300/solitaire-server
|
||||||
|
newTag: "32991301"
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mariadb
|
||||||
|
namespace: solitaire
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mariadb
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mariadb
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mariadb
|
||||||
|
image: mariadb:11
|
||||||
|
env:
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: matomo-secret
|
||||||
|
key: MYSQL_ROOT_PASSWORD
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: matomo-secret
|
||||||
|
key: MYSQL_DATABASE
|
||||||
|
- name: MYSQL_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: matomo-secret
|
||||||
|
key: MYSQL_USER
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: matomo-secret
|
||||||
|
key: MYSQL_PASSWORD
|
||||||
|
ports:
|
||||||
|
- containerPort: 3306
|
||||||
|
volumeMounts:
|
||||||
|
- name: mariadb-data
|
||||||
|
mountPath: /var/lib/mysql
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- healthcheck.sh
|
||||||
|
- --connect
|
||||||
|
- --innodb_initialized
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 30
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- healthcheck.sh
|
||||||
|
- --connect
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
volumes:
|
||||||
|
- name: mariadb-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mariadb-data
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mariadb-data
|
||||||
|
namespace: solitaire
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mariadb
|
||||||
|
namespace: solitaire
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mariadb
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 3306
|
||||||
|
targetPort: 3306
|
||||||
|
clusterIP: None
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: matomo
|
||||||
|
namespace: solitaire
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: matomo
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: matomo
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: matomo
|
||||||
|
image: matomo:5.10.0
|
||||||
|
env:
|
||||||
|
- name: MATOMO_DATABASE_HOST
|
||||||
|
value: mariadb
|
||||||
|
- name: MATOMO_DATABASE_PORT
|
||||||
|
value: "3306"
|
||||||
|
- name: MATOMO_DATABASE_ADAPTER
|
||||||
|
value: PDO\MYSQL
|
||||||
|
- name: MATOMO_DATABASE_DBNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: matomo-secret
|
||||||
|
key: MYSQL_DATABASE
|
||||||
|
- name: MATOMO_DATABASE_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: matomo-secret
|
||||||
|
key: MYSQL_USER
|
||||||
|
- name: MATOMO_DATABASE_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: matomo-secret
|
||||||
|
key: MYSQL_PASSWORD
|
||||||
|
# Traefik terminates SSL; tell Matomo to trust X-Forwarded-* headers
|
||||||
|
- name: MATOMO_GENERAL_ASSUME_SECURE_PROTOCOL
|
||||||
|
value: "1"
|
||||||
|
- name: MATOMO_GENERAL_PROXY_CLIENT_HEADERS
|
||||||
|
value: HTTP_X_FORWARDED_FOR
|
||||||
|
- name: MATOMO_GENERAL_PROXY_HOST_HEADERS
|
||||||
|
value: HTTP_X_FORWARDED_HOST
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- name: matomo-data
|
||||||
|
mountPath: /var/www/html
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /matomo.php
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /matomo.php
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
volumes:
|
||||||
|
- name: matomo-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: matomo-data
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: matomo-data
|
||||||
|
namespace: solitaire
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# DO NOT COMMIT THE REAL VERSION OF THIS FILE.
|
||||||
|
# deploy/matomo-secret.yaml is gitignored — apply it manually once:
|
||||||
|
#
|
||||||
|
# cp deploy/matomo-secret.yaml.example deploy/matomo-secret.yaml
|
||||||
|
# # edit the passwords below, then:
|
||||||
|
# kubectl apply -f deploy/matomo-secret.yaml
|
||||||
|
# kubectl annotate secret matomo-secret -n solitaire \
|
||||||
|
# argocd.argoproj.io/sync-options=Prune=false --overwrite
|
||||||
|
#
|
||||||
|
# Generate strong passwords with:
|
||||||
|
# python3 -c "import secrets; print(secrets.token_urlsafe(18))"
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: matomo-secret
|
||||||
|
namespace: solitaire
|
||||||
|
stringData:
|
||||||
|
MYSQL_ROOT_PASSWORD: "CHANGE_ME"
|
||||||
|
MYSQL_DATABASE: matomo
|
||||||
|
MYSQL_USER: matomo
|
||||||
|
MYSQL_PASSWORD: "CHANGE_ME"
|
||||||
|
MATOMO_ADMIN_PASSWORD: "CHANGE_ME"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: matomo
|
||||||
|
namespace: solitaire
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: matomo
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: solitaire
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: solitaire-db
|
||||||
|
namespace: solitaire
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: solitaire-server
|
||||||
|
namespace: solitaire
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: solitaire-server
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
||||||
@@ -143,16 +143,18 @@ After the APK is signed cargo-apk panics with:
|
|||||||
thread 'main' panicked: Bin is not compatible with Cdylib
|
thread 'main' panicked: Bin is not compatible with Cdylib
|
||||||
```
|
```
|
||||||
|
|
||||||
This happens AFTER the APK is on disk and signed. cargo-apk is
|
This happens AFTER the APK is on disk and signed. cargo-apk tries to
|
||||||
trying to also wrap the desktop `[[bin]]` target. The APK is still
|
also wrap the desktop `[[bin]]` target alongside the `[lib]`. The APK
|
||||||
valid. Work around with `--lib`:
|
is valid — the panic is cosmetic. **Always use `--lib`**, which is the
|
||||||
|
canonical build command (see `CLAUDE.md §15.1`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cargo apk build -p solitaire_app --target x86_64-linux-android --lib
|
cargo apk build -p solitaire_app --lib
|
||||||
```
|
```
|
||||||
|
|
||||||
(Permanent fix to come — likely a `[[bin]] required-features = ["desktop"]`
|
Root cause: upstream cargo-apk bug — it does not skip `[[bin]]` targets
|
||||||
gate so cargo-apk skips the bin target on Android.)
|
when building for Android. No in-repo fix is possible; `--lib` is the
|
||||||
|
accepted workaround.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
# Solitaire Quest — Session Handoff
|
# Ferrous Solitaire — Session Handoff (ARCHIVED)
|
||||||
|
|
||||||
|
> **This file is from Phase 2 (2026-04-25, 242 tests). It is kept for historical
|
||||||
|
> reference only. The authoritative session handoff is at the repo root:
|
||||||
|
> `SESSION_HANDOFF.md`.**
|
||||||
|
|
||||||
> Last updated: 2026-04-25
|
> Last updated: 2026-04-25
|
||||||
> Branch: `master` — pushed to https://github.com/funman300/Rusty_Solitaire.git
|
> Branch: `master` — pushed to https://github.com/funman300/Rusty_Solitaire.git
|
||||||
@@ -20,7 +24,7 @@ All seven Cargo crates created and compiling cleanly:
|
|||||||
| `solitaire_engine` | Stub | Bevy ECS systems — all plugins added in Phase 3 |
|
| `solitaire_engine` | Stub | Bevy ECS systems — all plugins added in Phase 3 |
|
||||||
| `solitaire_server` | Stub | Axum sync server — implemented in Phase 8C |
|
| `solitaire_server` | Stub | Axum sync server — implemented in Phase 8C |
|
||||||
| `solitaire_gpgs` | Compile-time stub | Google Play Games bridge — Android only, JNI in Phase: Android |
|
| `solitaire_gpgs` | Compile-time stub | Google Play Games bridge — Android only, JNI in Phase: Android |
|
||||||
| `solitaire_app` | Working | Opens blank Bevy window titled "Solitaire Quest" at 1280×800 |
|
| `solitaire_app` | Working | Opens blank Bevy window titled "Ferrous Solitaire" at 1280×800 |
|
||||||
|
|
||||||
Fast compile profiles, `assets/` directory structure, and `.env.example` are all in place.
|
Fast compile profiles, `assets/` directory structure, and `.env.example` are all in place.
|
||||||
|
|
||||||
|
|||||||
@@ -230,6 +230,31 @@ rewrites required.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## P5 — UX polish (2026-05-12)
|
||||||
|
|
||||||
|
- [x] **UX-1 — Modal Done button unreachable in gesture zone.** *Closed
|
||||||
|
2026-05-12.* New `apply_safe_area_to_modal_scrims` system in
|
||||||
|
`safe_area.rs` pads every `ModalScrim` bottom by `insets.bottom /
|
||||||
|
window.scale_factor()` (logical pixels). Fires when `SafeAreaInsets`
|
||||||
|
changes AND when a new `ModalScrim` is spawned (`Added<ModalScrim>`
|
||||||
|
filter). Verified on device: Settings Done button reachable at physical
|
||||||
|
y ≈ 1800–2000 (was y ≈ 2232+, inside gesture zone).
|
||||||
|
- [x] **UX-5b — Home mode selector glyph corruption.** *Closed
|
||||||
|
2026-05-12.* `home_plugin.rs` mode glyphs changed from Geometric Shapes
|
||||||
|
block (U+25xx — absent from FiraMono, renders as rectangles) to card
|
||||||
|
suits U+2660 ♠ / U+2665 ♥ / U+2666 ♦. Affects Zen, Challenge, and
|
||||||
|
Daily mode selector buttons shown at level 5+.
|
||||||
|
- [x] **UX-7 — Help screen HUD button entry wraps to two lines.** *Closed
|
||||||
|
2026-05-12.* Android `CONTROL_SECTIONS` entry for ≡ button shortened
|
||||||
|
from `"Menu: Stats, Settings, Profile, Achievements"` to
|
||||||
|
`"Open menu (Stats, Settings, Profile...)"` in `help_plugin.rs`.
|
||||||
|
Fits on one line at 360 dp.
|
||||||
|
- [x] **BUG-3 — Multi-modal stacking (Stats + Profile simultaneously).** *Closed
|
||||||
|
2026-05-12.* `handle_menu_button` in `hud_plugin.rs` now checks
|
||||||
|
`scrims: Query<(), With<ModalScrim>>` and only calls
|
||||||
|
`spawn_menu_popover` when `scrims.is_empty()`. Tapping ≡ while any
|
||||||
|
modal is open is a no-op. Verified on device.
|
||||||
|
|
||||||
## Notes / decisions
|
## Notes / decisions
|
||||||
|
|
||||||
* This list is screenshot-driven; expect more items to surface once
|
* This list is screenshot-driven; expect more items to surface once
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
> **Date:** 2026-04-28
|
> **Date:** 2026-04-28
|
||||||
> **Author:** Claude Code
|
> **Author:** Claude Code
|
||||||
> **Scope:** Feasibility analysis for porting Solitaire Quest to Android using cargo-mobile2
|
> **Scope:** Feasibility analysis for porting Ferrous Solitaire to Android using cargo-mobile2
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Solitaire Quest — Phase 1 + 2: Workspace & Core Game Engine
|
# Ferrous Solitaire — Phase 1 + 2: Workspace & Core Game Engine
|
||||||
|
|
||||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||||
|
|
||||||
@@ -555,7 +555,7 @@ fn main() {
|
|||||||
.add_plugins(
|
.add_plugins(
|
||||||
DefaultPlugins.set(WindowPlugin {
|
DefaultPlugins.set(WindowPlugin {
|
||||||
primary_window: Some(Window {
|
primary_window: Some(Window {
|
||||||
title: "Solitaire Quest".into(),
|
title: "Ferrous Solitaire".into(),
|
||||||
resolution: (1280.0, 800.0).into(),
|
resolution: (1280.0, 800.0).into(),
|
||||||
..default()
|
..default()
|
||||||
}),
|
}),
|
||||||
@@ -571,7 +571,7 @@ fn main() {
|
|||||||
```bash
|
```bash
|
||||||
cargo run -p solitaire_app --features bevy/dynamic_linking
|
cargo run -p solitaire_app --features bevy/dynamic_linking
|
||||||
```
|
```
|
||||||
Expected: A blank Bevy window titled "Solitaire Quest" opens. Press Escape or close the window to exit. No panics or errors in the terminal.
|
Expected: A blank Bevy window titled "Ferrous Solitaire" opens. Press Escape or close the window to exit. No panics or errors in the terminal.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1210,7 +1210,7 @@ fn main() {
|
|||||||
.add_plugins(
|
.add_plugins(
|
||||||
DefaultPlugins.set(WindowPlugin {
|
DefaultPlugins.set(WindowPlugin {
|
||||||
primary_window: Some(Window {
|
primary_window: Some(Window {
|
||||||
title: "Solitaire Quest".into(),
|
title: "Ferrous Solitaire".into(),
|
||||||
resolution: (1280.0, 800.0).into(),
|
resolution: (1280.0, 800.0).into(),
|
||||||
..default()
|
..default()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
### Infrastructure
|
### Infrastructure
|
||||||
|
|
||||||
- Two machines (or VMs) referred to as **Machine A** and **Machine B** throughout this runbook. Both must be able to reach the sync server over the network.
|
- Two machines (or VMs) referred to as **Machine A** and **Machine B** throughout this runbook. Both must be able to reach the sync server over the network.
|
||||||
- A running Solitaire Quest sync server reachable at a known URL, e.g. `https://solitaire.example.com`. See `README_SERVER.md` for setup.
|
- A running Ferrous Solitaire sync server reachable at a known URL, e.g. `https://solitaire.example.com`. See `README_SERVER.md` for setup.
|
||||||
- Verify the server is live before starting:
|
- Verify the server is live before starting:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
> **Why this exists.** The 24 mockups in this directory are mobile
|
> **Why this exists.** The 24 mockups in this directory are mobile
|
||||||
> (390 × 844 logical, iPhone 14 Pro frame) with one exception
|
> (390 × 844 logical, iPhone 14 Pro frame) with one exception
|
||||||
> (`home-menu-desktop.html`). The Stitch project that produced them
|
> (`home-menu-desktop.html`). The Stitch project that produced them
|
||||||
> is named "Solitaire Quest *Mobile* Redesign" — the mobile-first
|
> is named "Ferrous Solitaire *Mobile* Redesign" — the mobile-first
|
||||||
> framing was deliberate when the new Android target opened, but
|
> framing was deliberate when the new Android target opened, but
|
||||||
> desktop is still the primary delivery surface. Porting the mobile
|
> desktop is still the primary delivery surface. Porting the mobile
|
||||||
> mockups 1:1 would land a 390-px-wide column floating in the middle
|
> mockups 1:1 would land a 390-px-wide column floating in the middle
|
||||||
|
|||||||
@@ -0,0 +1,140 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build a self-signed Android APK from solitaire_app's cdylib targets.
|
||||||
|
#
|
||||||
|
# Replaces the cargo-apk pipeline with explicit cargo-ndk + aapt2 + apksigner
|
||||||
|
# steps. The CI runner was hitting an SDK-discovery bug inside cargo-apk's
|
||||||
|
# ndk-build crate that we couldn't isolate; running each Android toolchain
|
||||||
|
# step explicitly gives us a debuggable pipeline.
|
||||||
|
#
|
||||||
|
# Required environment:
|
||||||
|
# ANDROID_HOME Path to Android SDK root
|
||||||
|
# ANDROID_NDK_HOME Path to the specific NDK version
|
||||||
|
# BUILD_TOOLS_VERSION e.g. "34.0.0"
|
||||||
|
# PLATFORM e.g. "android-34"
|
||||||
|
#
|
||||||
|
# Optional environment:
|
||||||
|
# PROFILE "debug" (default) | "release"
|
||||||
|
# ABIS Space-separated Android ABIs to build (default:
|
||||||
|
# "arm64-v8a armeabi-v7a x86_64"). Reduce in CI to
|
||||||
|
# fit the runner's disk budget — a full three-ABI
|
||||||
|
# debug build can exceed 25 GB of target/ output.
|
||||||
|
# APK_OUT Output APK path (default: target/$PROFILE/apk/solitaire-quest.apk)
|
||||||
|
# KEYSTORE Path to keystore for signing (default: generates a debug keystore)
|
||||||
|
# KEYSTORE_PASS Keystore password (default: "android" for the generated debug keystore)
|
||||||
|
# KEY_ALIAS Key alias (default: "androiddebugkey")
|
||||||
|
# KEY_PASS Key password (default: same as KEYSTORE_PASS)
|
||||||
|
#
|
||||||
|
# Outputs:
|
||||||
|
# $APK_OUT Signed, zipaligned APK
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
: "${ANDROID_HOME:?ANDROID_HOME must be set}"
|
||||||
|
: "${ANDROID_NDK_HOME:?ANDROID_NDK_HOME must be set}"
|
||||||
|
: "${BUILD_TOOLS_VERSION:?BUILD_TOOLS_VERSION must be set}"
|
||||||
|
: "${PLATFORM:?PLATFORM must be set (e.g. android-34)}"
|
||||||
|
|
||||||
|
PROFILE="${PROFILE:-debug}"
|
||||||
|
ABIS="${ABIS:-arm64-v8a armeabi-v7a x86_64}"
|
||||||
|
APK_OUT="${APK_OUT:-target/${PROFILE}/apk/solitaire-quest.apk}"
|
||||||
|
|
||||||
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
cd "$REPO_ROOT"
|
||||||
|
|
||||||
|
BT="$ANDROID_HOME/build-tools/$BUILD_TOOLS_VERSION"
|
||||||
|
PLATFORM_JAR="$ANDROID_HOME/platforms/$PLATFORM/android.jar"
|
||||||
|
MANIFEST="solitaire_app/android/AndroidManifest.xml"
|
||||||
|
RES_DIR="solitaire_app/res"
|
||||||
|
ASSETS_DIR="assets"
|
||||||
|
|
||||||
|
# --- sanity ----------------------------------------------------------------
|
||||||
|
for f in "$BT/aapt2" "$BT/zipalign" "$BT/apksigner" "$PLATFORM_JAR" "$MANIFEST"; do
|
||||||
|
[ -e "$f" ] || { echo "missing: $f"; exit 1; }
|
||||||
|
done
|
||||||
|
|
||||||
|
STAGING="$(mktemp -d)"
|
||||||
|
trap 'rm -rf "$STAGING"' EXIT
|
||||||
|
mkdir -p "$STAGING/lib" "$STAGING/compiled-res"
|
||||||
|
|
||||||
|
# --- 1. native libraries via cargo-ndk -------------------------------------
|
||||||
|
# `-o $STAGING/lib` lays out files as $STAGING/lib/<abi>/libsolitaire_app.so
|
||||||
|
# which is the directory structure the APK expects under lib/.
|
||||||
|
CARGO_NDK_ARGS=( --platform 26 -o "$STAGING/lib" )
|
||||||
|
for abi in $ABIS; do
|
||||||
|
CARGO_NDK_ARGS+=( -t "$abi" )
|
||||||
|
done
|
||||||
|
CARGO_NDK_ARGS+=( build --package solitaire_app --lib )
|
||||||
|
if [ "$PROFILE" = "release" ]; then
|
||||||
|
CARGO_NDK_ARGS+=( --release )
|
||||||
|
fi
|
||||||
|
echo ">>> cargo ndk ${CARGO_NDK_ARGS[*]}"
|
||||||
|
cargo ndk "${CARGO_NDK_ARGS[@]}"
|
||||||
|
|
||||||
|
# --- 2. compile + link resources and manifest ------------------------------
|
||||||
|
if [ -d "$RES_DIR" ]; then
|
||||||
|
echo ">>> aapt2 compile resources"
|
||||||
|
"$BT/aapt2" compile --dir "$RES_DIR" -o "$STAGING/compiled-res"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LINK_ARGS=(
|
||||||
|
link
|
||||||
|
-o "$STAGING/app-unsigned.apk"
|
||||||
|
-I "$PLATFORM_JAR"
|
||||||
|
--manifest "$MANIFEST"
|
||||||
|
)
|
||||||
|
[ -d "$ASSETS_DIR" ] && LINK_ARGS+=( -A "$ASSETS_DIR" )
|
||||||
|
# Add compiled resources if any
|
||||||
|
shopt -s nullglob
|
||||||
|
RES_FLATS=( "$STAGING/compiled-res"/*.flat )
|
||||||
|
shopt -u nullglob
|
||||||
|
if [ ${#RES_FLATS[@]} -gt 0 ]; then
|
||||||
|
LINK_ARGS+=( "${RES_FLATS[@]}" )
|
||||||
|
fi
|
||||||
|
echo ">>> aapt2 link"
|
||||||
|
"$BT/aapt2" "${LINK_ARGS[@]}"
|
||||||
|
|
||||||
|
# --- 3. add native libraries to the APK ------------------------------------
|
||||||
|
echo ">>> bundle native libraries"
|
||||||
|
( cd "$STAGING" && zip -r -q app-unsigned.apk lib/ )
|
||||||
|
|
||||||
|
# --- 4. zipalign -----------------------------------------------------------
|
||||||
|
echo ">>> zipalign"
|
||||||
|
"$BT/zipalign" -p -f 4 "$STAGING/app-unsigned.apk" "$STAGING/app-aligned.apk"
|
||||||
|
# Free the unsigned intermediate now — apksigner reads $app-aligned.apk and
|
||||||
|
# writes $APK_OUT, and the runner's disk is tight after a multi-ABI build.
|
||||||
|
rm -f "$STAGING/app-unsigned.apk"
|
||||||
|
|
||||||
|
# --- 5. sign ---------------------------------------------------------------
|
||||||
|
if [ -z "${KEYSTORE:-}" ]; then
|
||||||
|
# Generate a deterministic debug keystore on the fly.
|
||||||
|
KEYSTORE="$STAGING/debug.keystore"
|
||||||
|
KEYSTORE_PASS="${KEYSTORE_PASS:-android}"
|
||||||
|
KEY_ALIAS="${KEY_ALIAS:-androiddebugkey}"
|
||||||
|
KEY_PASS="${KEY_PASS:-$KEYSTORE_PASS}"
|
||||||
|
echo ">>> generating debug keystore at $KEYSTORE"
|
||||||
|
keytool -genkeypair -v \
|
||||||
|
-keystore "$KEYSTORE" \
|
||||||
|
-storepass "$KEYSTORE_PASS" \
|
||||||
|
-alias "$KEY_ALIAS" \
|
||||||
|
-keypass "$KEY_PASS" \
|
||||||
|
-keyalg RSA -keysize 2048 -validity 10000 \
|
||||||
|
-dname "CN=Android Debug,O=Android,C=US" > /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
KEYSTORE_PASS="${KEYSTORE_PASS:-android}"
|
||||||
|
KEY_ALIAS="${KEY_ALIAS:-androiddebugkey}"
|
||||||
|
KEY_PASS="${KEY_PASS:-$KEYSTORE_PASS}"
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "$APK_OUT")"
|
||||||
|
echo ">>> apksigner sign -> $APK_OUT"
|
||||||
|
"$BT/apksigner" sign \
|
||||||
|
--ks "$KEYSTORE" \
|
||||||
|
--ks-pass "pass:$KEYSTORE_PASS" \
|
||||||
|
--ks-key-alias "$KEY_ALIAS" \
|
||||||
|
--key-pass "pass:$KEY_PASS" \
|
||||||
|
--out "$APK_OUT" \
|
||||||
|
"$STAGING/app-aligned.apk"
|
||||||
|
|
||||||
|
echo ">>> verify"
|
||||||
|
"$BT/apksigner" verify --verbose "$APK_OUT"
|
||||||
|
|
||||||
|
echo ">>> done: $APK_OUT"
|
||||||
@@ -87,7 +87,7 @@ required = true
|
|||||||
name = "android.permission.INTERNET"
|
name = "android.permission.INTERNET"
|
||||||
|
|
||||||
[package.metadata.android.application]
|
[package.metadata.android.application]
|
||||||
label = "Solitaire Quest"
|
label = "Ferrous Solitaire"
|
||||||
# Launcher icon — references the density-bucketed mipmap resource above.
|
# Launcher icon — references the density-bucketed mipmap resource above.
|
||||||
icon = "@mipmap/ic_launcher"
|
icon = "@mipmap/ic_launcher"
|
||||||
# `debuggable` defaults to false on release builds; cargo-apk flips it
|
# `debuggable` defaults to false on release builds; cargo-apk flips it
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Mirrors what cargo-apk would generate from [package.metadata.android]
|
||||||
|
in solitaire_app/Cargo.toml. Kept in-tree so the CI workflow can drive
|
||||||
|
aapt2 directly without going through cargo-apk's brittle SDK discovery.
|
||||||
|
|
||||||
|
Keep in sync with:
|
||||||
|
* Cargo.toml: package, min_sdk_version, target_sdk_version,
|
||||||
|
uses_feature, uses_permission, application label/icon,
|
||||||
|
activity orientation
|
||||||
|
* [lib].name (currently "solitaire_app") — matches the
|
||||||
|
`android.app.lib_name` meta-data value below, which is the
|
||||||
|
shared object name without the `lib` prefix or `.so` suffix.
|
||||||
|
-->
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.solitairequest.app"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0">
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="26"
|
||||||
|
android:targetSdkVersion="34" />
|
||||||
|
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.touchscreen"
|
||||||
|
android:required="true" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:label="Ferrous Solitaire"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:hasCode="false">
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="android.app.NativeActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:configChanges="orientation|keyboardHidden|screenSize|keyboard|navigation|screenLayout">
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="android.app.lib_name"
|
||||||
|
android:value="solitaire_app" />
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
@@ -25,7 +25,7 @@ use bevy::window::{Monitor, PrimaryMonitor, PrimaryWindow};
|
|||||||
use bevy::winit::WinitWindows;
|
use bevy::winit::WinitWindows;
|
||||||
use solitaire_data::{load_settings_from, provider_for_backend, settings_file_path, Settings};
|
use solitaire_data::{load_settings_from, provider_for_backend, settings_file_path, Settings};
|
||||||
use solitaire_engine::{
|
use solitaire_engine::{
|
||||||
register_theme_asset_sources, AchievementPlugin, AnimationPlugin, AssetSourcesPlugin,
|
register_theme_asset_sources, AchievementPlugin, AnalyticsPlugin, AnimationPlugin, AssetSourcesPlugin,
|
||||||
AudioPlugin, AutoCompletePlugin, CardAnimationPlugin, CardPlugin, ChallengePlugin,
|
AudioPlugin, AutoCompletePlugin, CardAnimationPlugin, CardPlugin, ChallengePlugin,
|
||||||
CursorPlugin, DailyChallengePlugin, DiagnosticsHudPlugin, DifficultyPlugin, FeedbackAnimPlugin,
|
CursorPlugin, DailyChallengePlugin, DiagnosticsHudPlugin, DifficultyPlugin, FeedbackAnimPlugin,
|
||||||
FontPlugin, GamePlugin, HelpPlugin, HomePlugin, HudPlugin, InputPlugin, LeaderboardPlugin,
|
FontPlugin, GamePlugin, HelpPlugin, HomePlugin, HudPlugin, InputPlugin, LeaderboardPlugin,
|
||||||
@@ -106,7 +106,7 @@ pub fn run() {
|
|||||||
DefaultPlugins
|
DefaultPlugins
|
||||||
.set(WindowPlugin {
|
.set(WindowPlugin {
|
||||||
primary_window: Some(Window {
|
primary_window: Some(Window {
|
||||||
title: "Solitaire Quest".into(),
|
title: "Ferrous Solitaire".into(),
|
||||||
// X11/Wayland WM_CLASS so taskbar managers group
|
// X11/Wayland WM_CLASS so taskbar managers group
|
||||||
// multiple windows of this app correctly.
|
// multiple windows of this app correctly.
|
||||||
name: Some("solitaire-quest".into()),
|
name: Some("solitaire-quest".into()),
|
||||||
@@ -194,6 +194,7 @@ pub fn run() {
|
|||||||
.add_plugins(OnboardingPlugin)
|
.add_plugins(OnboardingPlugin)
|
||||||
.add_plugins(SyncPlugin::new(sync_provider))
|
.add_plugins(SyncPlugin::new(sync_provider))
|
||||||
.add_plugins(SyncSetupPlugin)
|
.add_plugins(SyncSetupPlugin)
|
||||||
|
.add_plugins(AnalyticsPlugin)
|
||||||
.add_plugins(LeaderboardPlugin)
|
.add_plugins(LeaderboardPlugin)
|
||||||
.add_plugins(WinSummaryPlugin)
|
.add_plugins(WinSummaryPlugin)
|
||||||
.add_plugins(UiModalPlugin)
|
.add_plugins(UiModalPlugin)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//! Generates PNG assets for Solitaire Quest.
|
//! Generates PNG assets for Ferrous Solitaire.
|
||||||
//!
|
//!
|
||||||
//! Produces:
|
//! Produces:
|
||||||
//! - 52 card face PNGs (120×168) — one per card, with rank, suit symbol, and
|
//! - 52 card face PNGs (120×168) — one per card, with rank, suit symbol, and
|
||||||
|
|||||||
@@ -145,6 +145,10 @@ pub struct GameState {
|
|||||||
/// Used by the `comeback` achievement condition.
|
/// Used by the `comeback` achievement condition.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub recycle_count: u32,
|
pub recycle_count: u32,
|
||||||
|
/// When `true`, the player may move the top card of a foundation pile back
|
||||||
|
/// onto a compatible tableau column. Off by default — non-standard house rule.
|
||||||
|
#[serde(default)]
|
||||||
|
pub take_from_foundation: bool,
|
||||||
/// Save-file schema version. Defaults to `1` for older files that pre-date
|
/// Save-file schema version. Defaults to `1` for older files that pre-date
|
||||||
/// the field. The loader refuses any value other than
|
/// the field. The loader refuses any value other than
|
||||||
/// [`GAME_STATE_SCHEMA_VERSION`].
|
/// [`GAME_STATE_SCHEMA_VERSION`].
|
||||||
@@ -187,6 +191,7 @@ impl GameState {
|
|||||||
is_auto_completable: false,
|
is_auto_completable: false,
|
||||||
undo_count: 0,
|
undo_count: 0,
|
||||||
recycle_count: 0,
|
recycle_count: 0,
|
||||||
|
take_from_foundation: false,
|
||||||
schema_version: GAME_STATE_SCHEMA_VERSION,
|
schema_version: GAME_STATE_SCHEMA_VERSION,
|
||||||
undo_stack: VecDeque::new(),
|
undo_stack: VecDeque::new(),
|
||||||
}
|
}
|
||||||
@@ -312,6 +317,18 @@ impl GameState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
PileType::Tableau(_) => {
|
PileType::Tableau(_) => {
|
||||||
|
if matches!(&from, PileType::Foundation(_)) {
|
||||||
|
if !self.take_from_foundation {
|
||||||
|
return Err(MoveError::RuleViolation(
|
||||||
|
"take-from-foundation rule is disabled".into(),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
if count != 1 {
|
||||||
|
return Err(MoveError::RuleViolation(
|
||||||
|
"only one card can return from foundation at a time".into(),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
let dest = self.piles.get(&to).ok_or(MoveError::InvalidDestination)?;
|
let dest = self.piles.get(&to).ok_or(MoveError::InvalidDestination)?;
|
||||||
if !can_place_on_tableau(&bottom_card, dest) {
|
if !can_place_on_tableau(&bottom_card, dest) {
|
||||||
return Err(MoveError::RuleViolation("invalid tableau placement".into()));
|
return Err(MoveError::RuleViolation("invalid tableau placement".into()));
|
||||||
@@ -409,12 +426,11 @@ impl GameState {
|
|||||||
/// Returns `true` when stock and waste are empty and all tableau cards are face-up.
|
/// Returns `true` when stock and waste are empty and all tableau cards are face-up.
|
||||||
/// At that point the game can be completed without further player input.
|
/// At that point the game can be completed without further player input.
|
||||||
pub fn check_auto_complete(&self) -> bool {
|
pub fn check_auto_complete(&self) -> bool {
|
||||||
|
// Stock must be empty; waste may still have cards (they are resolved
|
||||||
|
// by draw() calls inside next_auto_complete_move / auto_complete_step).
|
||||||
if !self.piles[&PileType::Stock].cards.is_empty() {
|
if !self.piles[&PileType::Stock].cards.is_empty() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if !self.piles[&PileType::Waste].cards.is_empty() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
(0..7).all(|i| {
|
(0..7).all(|i| {
|
||||||
self.piles[&PileType::Tableau(i)]
|
self.piles[&PileType::Tableau(i)]
|
||||||
.cards
|
.cards
|
||||||
@@ -442,17 +458,36 @@ impl GameState {
|
|||||||
if !self.is_auto_completable || self.is_won {
|
if !self.is_auto_completable || self.is_won {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
// Check waste top first — when stock is exhausted the waste may still
|
||||||
|
// contain cards that can go directly to a foundation.
|
||||||
|
let waste = PileType::Waste;
|
||||||
|
if let Some((card, slot)) = self.piles[&waste].cards.last()
|
||||||
|
.and_then(|c| self.foundation_slot_for(c).map(|s| (c, s)))
|
||||||
|
{
|
||||||
|
let _ = card; // borrow ends here
|
||||||
|
return Some((waste, PileType::Foundation(slot)));
|
||||||
|
}
|
||||||
for i in 0..7 {
|
for i in 0..7 {
|
||||||
let tableau = PileType::Tableau(i);
|
let tableau = PileType::Tableau(i);
|
||||||
if let Some(card) = self.piles[&tableau].cards.last() {
|
if let Some(slot) = self.piles[&tableau].cards.last()
|
||||||
// Prefer the slot that already claims this card's suit so
|
.and_then(|c| self.foundation_slot_for(c))
|
||||||
// Aces don't sometimes land in slot 0 and then leave the
|
{
|
||||||
// matching suit-claimed slot empty.
|
return Some((tableau, PileType::Foundation(slot)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
None
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the foundation slot index that `card` can legally move to, or
|
||||||
|
/// `None` if no such slot exists.
|
||||||
|
///
|
||||||
|
/// Prefers the slot already claiming this card's suit so Aces always land
|
||||||
|
/// in a consistent column. Falls back to an empty slot only for Aces.
|
||||||
|
fn foundation_slot_for(&self, card: &crate::card::Card) -> Option<u8> {
|
||||||
let mut candidate: Option<u8> = None;
|
let mut candidate: Option<u8> = None;
|
||||||
let mut empty_slot: Option<u8> = None;
|
let mut empty_slot: Option<u8> = None;
|
||||||
for slot in 0..4_u8 {
|
for slot in 0..4_u8 {
|
||||||
let foundation = PileType::Foundation(slot);
|
let pile = &self.piles[&PileType::Foundation(slot)];
|
||||||
let pile = &self.piles[&foundation];
|
|
||||||
if pile.cards.is_empty() {
|
if pile.cards.is_empty() {
|
||||||
if empty_slot.is_none() {
|
if empty_slot.is_none() {
|
||||||
empty_slot = Some(slot);
|
empty_slot = Some(slot);
|
||||||
@@ -462,20 +497,12 @@ impl GameState {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let target_slot = candidate.or_else(|| {
|
let target = candidate.or_else(|| {
|
||||||
// Only fall back to an empty slot if the card is an Ace,
|
|
||||||
// which is the only rank that can claim an empty slot.
|
|
||||||
if card.rank.value() == 1 { empty_slot } else { None }
|
if card.rank.value() == 1 { empty_slot } else { None }
|
||||||
});
|
});
|
||||||
if let Some(slot) = target_slot {
|
target.filter(|&slot| {
|
||||||
let foundation = PileType::Foundation(slot);
|
can_place_on_foundation(card, &self.piles[&PileType::Foundation(slot)])
|
||||||
if can_place_on_foundation(card, &self.piles[&foundation]) {
|
})
|
||||||
return Some((tableau, foundation));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
None
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Time bonus added to score on win: `700_000 / elapsed_seconds` (0 if elapsed is 0).
|
/// Time bonus added to score on win: `700_000 / elapsed_seconds` (0 if elapsed is 0).
|
||||||
@@ -1005,24 +1032,24 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn auto_complete_false_when_waste_not_empty() {
|
fn auto_complete_true_when_stock_empty_waste_has_cards() {
|
||||||
|
// Waste no longer blocks auto-complete — draw() drains it during
|
||||||
|
// auto-complete steps. Only stock-not-empty and face-down tableau
|
||||||
|
// cards block the flag.
|
||||||
let mut g = new_game();
|
let mut g = new_game();
|
||||||
g.piles.get_mut(&PileType::Stock).unwrap().cards.clear();
|
g.piles.get_mut(&PileType::Stock).unwrap().cards.clear();
|
||||||
// Leave the waste pile untouched (it may be empty after clearing stock,
|
|
||||||
// so add a card explicitly to ensure the waste guard is exercised).
|
|
||||||
g.piles.get_mut(&PileType::Waste).unwrap().cards.push(Card {
|
g.piles.get_mut(&PileType::Waste).unwrap().cards.push(Card {
|
||||||
id: 99,
|
id: 99,
|
||||||
suit: Suit::Clubs,
|
suit: Suit::Clubs,
|
||||||
rank: Rank::Ace,
|
rank: Rank::Ace,
|
||||||
face_up: true,
|
face_up: true,
|
||||||
});
|
});
|
||||||
// Make all tableau cards face-up so only the waste guard is the blocker.
|
|
||||||
for i in 0..7 {
|
for i in 0..7 {
|
||||||
for c in g.piles.get_mut(&PileType::Tableau(i)).unwrap().cards.iter_mut() {
|
for c in g.piles.get_mut(&PileType::Tableau(i)).unwrap().cards.iter_mut() {
|
||||||
c.face_up = true;
|
c.face_up = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert!(!g.check_auto_complete());
|
assert!(g.check_auto_complete());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -1258,4 +1285,71 @@ mod tests {
|
|||||||
"must target the Hearts-claimed slot, not the empty slot 0",
|
"must target the Hearts-claimed slot, not the empty slot 0",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn setup_take_from_foundation_game() -> GameState {
|
||||||
|
let mut g = new_game();
|
||||||
|
// Clear the board so we control the layout exactly.
|
||||||
|
g.piles.get_mut(&PileType::Stock).unwrap().cards.clear();
|
||||||
|
g.piles.get_mut(&PileType::Waste).unwrap().cards.clear();
|
||||||
|
for i in 0..7 {
|
||||||
|
g.piles.get_mut(&PileType::Tableau(i)).unwrap().cards.clear();
|
||||||
|
}
|
||||||
|
// Foundation slot 0: A♠, 2♠ (top = 2♠)
|
||||||
|
let f = g.piles.get_mut(&PileType::Foundation(0)).unwrap();
|
||||||
|
f.cards.push(Card { id: 1, suit: Suit::Spades, rank: Rank::Ace, face_up: true });
|
||||||
|
f.cards.push(Card { id: 2, suit: Suit::Spades, rank: Rank::Two, face_up: true });
|
||||||
|
// Tableau 0: 3♥ face-up (2♠ can go on 3♥ — different colour, rank-1)
|
||||||
|
g.piles.get_mut(&PileType::Tableau(0)).unwrap().cards.push(Card {
|
||||||
|
id: 3, suit: Suit::Hearts, rank: Rank::Three, face_up: true,
|
||||||
|
});
|
||||||
|
g
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn take_from_foundation_blocked_by_default() {
|
||||||
|
let mut g = setup_take_from_foundation_game();
|
||||||
|
assert!(!g.take_from_foundation);
|
||||||
|
let err = g
|
||||||
|
.move_cards(PileType::Foundation(0), PileType::Tableau(0), 1)
|
||||||
|
.unwrap_err();
|
||||||
|
assert!(
|
||||||
|
matches!(err, MoveError::RuleViolation(_)),
|
||||||
|
"expected RuleViolation, got {err:?}",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn take_from_foundation_allowed_when_enabled() {
|
||||||
|
let mut g = setup_take_from_foundation_game();
|
||||||
|
g.take_from_foundation = true;
|
||||||
|
g.move_cards(PileType::Foundation(0), PileType::Tableau(0), 1).unwrap();
|
||||||
|
// Foundation slot 0 should now hold only the Ace.
|
||||||
|
assert_eq!(g.piles[&PileType::Foundation(0)].cards.len(), 1);
|
||||||
|
assert_eq!(g.piles[&PileType::Foundation(0)].cards[0].rank, Rank::Ace);
|
||||||
|
// The 2♠ should be on top of tableau 0 above the 3♥.
|
||||||
|
let t0 = &g.piles[&PileType::Tableau(0)].cards;
|
||||||
|
assert_eq!(t0.len(), 2);
|
||||||
|
assert_eq!(t0[1].rank, Rank::Two);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn take_from_foundation_rejects_illegal_tableau_placement() {
|
||||||
|
let mut g = setup_take_from_foundation_game();
|
||||||
|
g.take_from_foundation = true;
|
||||||
|
// Tableau 1 is empty — only a King can go there; 2♠ is not a King.
|
||||||
|
let err = g
|
||||||
|
.move_cards(PileType::Foundation(0), PileType::Tableau(1), 1)
|
||||||
|
.unwrap_err();
|
||||||
|
assert!(matches!(err, MoveError::RuleViolation(_)));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn take_from_foundation_rejects_count_gt_1() {
|
||||||
|
let mut g = setup_take_from_foundation_game();
|
||||||
|
g.take_from_foundation = true;
|
||||||
|
let err = g
|
||||||
|
.move_cards(PileType::Foundation(0), PileType::Tableau(0), 2)
|
||||||
|
.unwrap_err();
|
||||||
|
assert!(matches!(err, MoveError::RuleViolation(_)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ async-trait = { workspace = true }
|
|||||||
dirs = { workspace = true }
|
dirs = { workspace = true }
|
||||||
reqwest = { workspace = true }
|
reqwest = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
|
uuid = { workspace = true }
|
||||||
|
|
||||||
# `keyring-core` is the typed Entry/Error API used by
|
# `keyring-core` is the typed Entry/Error API used by
|
||||||
# `auth_tokens`. The crate's own dependency tree pulls in
|
# `auth_tokens`. The crate's own dependency tree pulls in
|
||||||
|
|||||||
@@ -27,10 +27,6 @@ pub trait SyncProvider: Send + Sync {
|
|||||||
fn backend_name(&self) -> &'static str;
|
fn backend_name(&self) -> &'static str;
|
||||||
/// Returns true if the user is currently authenticated with this backend.
|
/// Returns true if the user is currently authenticated with this backend.
|
||||||
fn is_authenticated(&self) -> bool;
|
fn is_authenticated(&self) -> bool;
|
||||||
/// Mirror an achievement unlock to this backend (no-op for most backends).
|
|
||||||
async fn mirror_achievement(&self, _id: &str) -> Result<(), SyncError> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
/// Fetch the global leaderboard from this backend. Returns an empty list
|
/// Fetch the global leaderboard from this backend. Returns an empty list
|
||||||
/// for backends that do not support leaderboards (e.g. `LocalOnlyProvider`).
|
/// for backends that do not support leaderboards (e.g. `LocalOnlyProvider`).
|
||||||
async fn fetch_leaderboard(&self) -> Result<Vec<LeaderboardEntry>, SyncError> {
|
async fn fetch_leaderboard(&self) -> Result<Vec<LeaderboardEntry>, SyncError> {
|
||||||
@@ -83,9 +79,6 @@ impl SyncProvider for Box<dyn SyncProvider + Send + Sync> {
|
|||||||
fn is_authenticated(&self) -> bool {
|
fn is_authenticated(&self) -> bool {
|
||||||
(**self).is_authenticated()
|
(**self).is_authenticated()
|
||||||
}
|
}
|
||||||
async fn mirror_achievement(&self, id: &str) -> Result<(), SyncError> {
|
|
||||||
(**self).mirror_achievement(id).await
|
|
||||||
}
|
|
||||||
async fn fetch_leaderboard(&self) -> Result<Vec<LeaderboardEntry>, SyncError> {
|
async fn fetch_leaderboard(&self) -> Result<Vec<LeaderboardEntry>, SyncError> {
|
||||||
(**self).fetch_leaderboard().await
|
(**self).fetch_leaderboard().await
|
||||||
}
|
}
|
||||||
@@ -170,5 +163,8 @@ pub use replay::{
|
|||||||
REPLAY_HISTORY_CAP, REPLAY_HISTORY_SCHEMA_VERSION, REPLAY_SCHEMA_VERSION,
|
REPLAY_HISTORY_CAP, REPLAY_HISTORY_SCHEMA_VERSION, REPLAY_SCHEMA_VERSION,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub mod matomo_client;
|
||||||
|
pub use matomo_client::MatomoClient;
|
||||||
|
|
||||||
pub mod platform;
|
pub mod platform;
|
||||||
pub use platform::data_dir;
|
pub use platform::data_dir;
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
//! Matomo HTTP Tracking API client.
|
||||||
|
//!
|
||||||
|
//! Buffers game-play events and flushes them via the Matomo bulk tracking
|
||||||
|
//! endpoint. Errors are silently discarded — analytics must never affect
|
||||||
|
//! gameplay or block the UI.
|
||||||
|
|
||||||
|
use std::sync::Mutex;
|
||||||
|
|
||||||
|
use reqwest::Client;
|
||||||
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
/// Sends game-play events to a self-hosted Matomo instance via the
|
||||||
|
/// [HTTP Tracking API](https://developer.matomo.org/api-reference/tracking-api).
|
||||||
|
///
|
||||||
|
/// Construct once per session and share via `Arc`. `event` is cheap and
|
||||||
|
/// can be called from the Bevy main thread; `flush` is async and must be
|
||||||
|
/// called from a background task.
|
||||||
|
pub struct MatomoClient {
|
||||||
|
tracking_url: String,
|
||||||
|
site_id: u32,
|
||||||
|
/// 16 hex-char visitor ID, stable for the lifetime of this client.
|
||||||
|
visitor_id: String,
|
||||||
|
uid: Option<String>,
|
||||||
|
client: Client,
|
||||||
|
/// Pre-encoded query strings, one per buffered event.
|
||||||
|
pending: Mutex<Vec<String>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl MatomoClient {
|
||||||
|
/// Create a new client targeting `base_url` (e.g. `"https://analytics.example.com"`).
|
||||||
|
pub fn new(base_url: impl AsRef<str>, site_id: u32, uid: Option<String>) -> Self {
|
||||||
|
let base = base_url.as_ref().trim_end_matches('/');
|
||||||
|
let tracking_url = format!("{}/matomo.php", base);
|
||||||
|
// Take the lower 64 bits of a v4 UUID and format as 16 hex chars.
|
||||||
|
let visitor_id = format!("{:016x}", Uuid::new_v4().as_u128() as u64);
|
||||||
|
Self {
|
||||||
|
tracking_url,
|
||||||
|
site_id,
|
||||||
|
visitor_id,
|
||||||
|
uid,
|
||||||
|
client: Client::new(),
|
||||||
|
pending: Mutex::new(Vec::new()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Buffer one Matomo custom event. Never blocks; never fails visibly.
|
||||||
|
///
|
||||||
|
/// When the buffer exceeds 100 events the oldest 50 are dropped to
|
||||||
|
/// prevent unbounded memory growth during extended offline play.
|
||||||
|
pub fn event(
|
||||||
|
&self,
|
||||||
|
category: &str,
|
||||||
|
action: &str,
|
||||||
|
name: Option<&str>,
|
||||||
|
value: Option<f64>,
|
||||||
|
) {
|
||||||
|
let Ok(mut guard) = self.pending.lock() else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
let mut qs = format!(
|
||||||
|
"idsite={}&rec=1&apiv=1&send_image=0\
|
||||||
|
&url=game%3A%2F%2Fsolitaire%2Fevent\
|
||||||
|
&_id={}&e_c={}&e_a={}",
|
||||||
|
self.site_id,
|
||||||
|
self.visitor_id,
|
||||||
|
url_encode(category),
|
||||||
|
url_encode(action),
|
||||||
|
);
|
||||||
|
if let Some(n) = name {
|
||||||
|
qs.push_str(&format!("&e_n={}", url_encode(n)));
|
||||||
|
}
|
||||||
|
if let Some(v) = value {
|
||||||
|
qs.push_str(&format!("&e_v={v}"));
|
||||||
|
}
|
||||||
|
if let Some(uid) = &self.uid {
|
||||||
|
qs.push_str(&format!("&uid={}", url_encode(uid)));
|
||||||
|
}
|
||||||
|
|
||||||
|
guard.push(qs);
|
||||||
|
if guard.len() > 100 {
|
||||||
|
guard.drain(0..50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Drain the pending buffer and POST it to Matomo's bulk tracking endpoint.
|
||||||
|
///
|
||||||
|
/// The buffer is drained *before* the HTTP call so events recorded during
|
||||||
|
/// an in-flight flush are not lost. Network errors are silently discarded.
|
||||||
|
pub async fn flush(&self) {
|
||||||
|
let pending = {
|
||||||
|
let Ok(mut guard) = self.pending.lock() else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
if guard.is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
std::mem::take(&mut *guard)
|
||||||
|
};
|
||||||
|
|
||||||
|
let requests: Vec<String> = pending.into_iter().map(|qs| format!("?{qs}")).collect();
|
||||||
|
let body = serde_json::json!({ "requests": requests });
|
||||||
|
|
||||||
|
let _ = self
|
||||||
|
.client
|
||||||
|
.post(&self.tracking_url)
|
||||||
|
.json(&body)
|
||||||
|
.send()
|
||||||
|
.await;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn url_encode(s: &str) -> String {
|
||||||
|
s.chars()
|
||||||
|
.flat_map(|c| match c {
|
||||||
|
'A'..='Z' | 'a'..='z' | '0'..='9' | '-' | '_' | '.' | '~' => {
|
||||||
|
vec![c]
|
||||||
|
}
|
||||||
|
c => format!("%{:02X}", c as u32).chars().collect(),
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
@@ -49,7 +49,7 @@ pub enum SyncBackend {
|
|||||||
#[default]
|
#[default]
|
||||||
#[serde(rename = "local")]
|
#[serde(rename = "local")]
|
||||||
Local,
|
Local,
|
||||||
/// Sync with a self-hosted Solitaire Quest server.
|
/// Sync with a self-hosted Ferrous Solitaire server.
|
||||||
#[serde(rename = "solitaire_server")]
|
#[serde(rename = "solitaire_server")]
|
||||||
SolitaireServer {
|
SolitaireServer {
|
||||||
/// Base URL of the server, e.g. `"https://solitaire.example.com"`.
|
/// Base URL of the server, e.g. `"https://solitaire.example.com"`.
|
||||||
@@ -143,11 +143,10 @@ pub struct Settings {
|
|||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub window_geometry: Option<WindowGeometry>,
|
pub window_geometry: Option<WindowGeometry>,
|
||||||
/// Identifier of the active card-art theme. Matches `meta.id` from
|
/// Identifier of the active card-art theme. Matches `meta.id` from
|
||||||
/// the theme's `theme.ron` manifest. `"default"` is the bundled
|
/// the theme's `theme.ron` manifest. `"dark"` and `"classic"` are
|
||||||
/// theme and is always present in the registry; user-supplied
|
/// always present; user-supplied themes register under their own ids.
|
||||||
/// themes register under their own ids when they're imported.
|
/// Older `settings.json` files that stored `"default"` or `"classic"`
|
||||||
/// Older `settings.json` files default cleanly to `"default"` via
|
/// are migrated to `"dark"` by [`Settings::sanitized`].
|
||||||
/// `#[serde(default = ...)]`.
|
|
||||||
#[serde(default = "default_theme_id")]
|
#[serde(default = "default_theme_id")]
|
||||||
pub selected_theme_id: String,
|
pub selected_theme_id: String,
|
||||||
/// Set to `true` once the achievement-onboarding info-toast has been
|
/// Set to `true` once the achievement-onboarding info-toast has been
|
||||||
@@ -231,6 +230,33 @@ pub struct Settings {
|
|||||||
/// cleanly to `None` via `#[serde(default)]`.
|
/// cleanly to `None` via `#[serde(default)]`.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub last_difficulty: Option<DifficultyLevel>,
|
pub last_difficulty: Option<DifficultyLevel>,
|
||||||
|
/// Custom public name displayed on the leaderboard. When `None`, the
|
||||||
|
/// player's server `username` is used instead. Trimmed to 32 characters
|
||||||
|
/// before submission. Older `settings.json` files written before this
|
||||||
|
/// field existed deserialize cleanly to `None` via `#[serde(default)]`.
|
||||||
|
#[serde(default)]
|
||||||
|
pub leaderboard_display_name: Option<String>,
|
||||||
|
/// When `true`, the player may drag the top card of a completed foundation
|
||||||
|
/// pile back onto a compatible tableau column — a non-standard house rule.
|
||||||
|
/// Off by default. Older `settings.json` files deserialize cleanly to
|
||||||
|
/// `false` via `#[serde(default)]`.
|
||||||
|
#[serde(default)]
|
||||||
|
pub take_from_foundation: bool,
|
||||||
|
/// When `true`, anonymous game-play events (game start, game won, etc.)
|
||||||
|
/// are sent to the configured Matomo instance. Opt-in; defaults to `false`.
|
||||||
|
/// Requires `matomo_url` to be set. Older `settings.json` files deserialize
|
||||||
|
/// cleanly to `false` via `#[serde(default)]`.
|
||||||
|
#[serde(default)]
|
||||||
|
pub analytics_enabled: bool,
|
||||||
|
/// Base URL of the Matomo instance to send events to, e.g.
|
||||||
|
/// `"https://analytics.example.com"`. When `None` the analytics toggle has
|
||||||
|
/// no effect. Older `settings.json` files deserialize cleanly to `None`.
|
||||||
|
#[serde(default)]
|
||||||
|
pub matomo_url: Option<String>,
|
||||||
|
/// Matomo site ID assigned when the tracked site was created in Matomo.
|
||||||
|
/// Defaults to `1` (the first site created in a fresh Matomo install).
|
||||||
|
#[serde(default = "default_matomo_site_id")]
|
||||||
|
pub matomo_site_id: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn default_draw_mode() -> DrawMode {
|
fn default_draw_mode() -> DrawMode {
|
||||||
@@ -246,7 +272,7 @@ fn default_music_volume() -> f32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn default_theme_id() -> String {
|
fn default_theme_id() -> String {
|
||||||
"default".to_string()
|
"dark".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Default tooltip-hover dwell delay in seconds. Mirrors
|
/// Default tooltip-hover dwell delay in seconds. Mirrors
|
||||||
@@ -299,6 +325,10 @@ fn default_replay_move_interval_secs() -> f32 {
|
|||||||
0.45
|
0.45
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_matomo_site_id() -> u32 {
|
||||||
|
1
|
||||||
|
}
|
||||||
|
|
||||||
/// Lower bound of the player-tunable replay-playback per-move interval,
|
/// Lower bound of the player-tunable replay-playback per-move interval,
|
||||||
/// in seconds. Below this the cards barely register visually before
|
/// in seconds. Below this the cards barely register visually before
|
||||||
/// the next move fires; the cap keeps the playback legible.
|
/// the next move fires; the cap keeps the playback legible.
|
||||||
@@ -350,6 +380,11 @@ impl Default for Settings {
|
|||||||
disable_smart_default_size: false,
|
disable_smart_default_size: false,
|
||||||
replay_move_interval_secs: default_replay_move_interval_secs(),
|
replay_move_interval_secs: default_replay_move_interval_secs(),
|
||||||
last_difficulty: None,
|
last_difficulty: None,
|
||||||
|
leaderboard_display_name: None,
|
||||||
|
take_from_foundation: false,
|
||||||
|
analytics_enabled: false,
|
||||||
|
matomo_url: None,
|
||||||
|
matomo_site_id: default_matomo_site_id(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -360,6 +395,13 @@ impl Settings {
|
|||||||
/// their respective ranges after deserialization or hand-editing of
|
/// their respective ranges after deserialization or hand-editing of
|
||||||
/// `settings.json`.
|
/// `settings.json`.
|
||||||
pub fn sanitized(self) -> Self {
|
pub fn sanitized(self) -> Self {
|
||||||
|
// Migrate stale theme IDs: "default" was removed when the theme was
|
||||||
|
// renamed to "dark"; "classic" was briefly the default before "dark"
|
||||||
|
// was restored as the shipped default.
|
||||||
|
let selected_theme_id = match self.selected_theme_id.as_str() {
|
||||||
|
"default" | "classic" => "dark".to_string(),
|
||||||
|
_ => self.selected_theme_id,
|
||||||
|
};
|
||||||
Self {
|
Self {
|
||||||
sfx_volume: self.sfx_volume.clamp(0.0, 1.0),
|
sfx_volume: self.sfx_volume.clamp(0.0, 1.0),
|
||||||
music_volume: self.music_volume.clamp(0.0, 1.0),
|
music_volume: self.music_volume.clamp(0.0, 1.0),
|
||||||
@@ -372,6 +414,7 @@ impl Settings {
|
|||||||
replay_move_interval_secs: self
|
replay_move_interval_secs: self
|
||||||
.replay_move_interval_secs
|
.replay_move_interval_secs
|
||||||
.clamp(REPLAY_MOVE_INTERVAL_MIN_SECS, REPLAY_MOVE_INTERVAL_MAX_SECS),
|
.clamp(REPLAY_MOVE_INTERVAL_MIN_SECS, REPLAY_MOVE_INTERVAL_MAX_SECS),
|
||||||
|
selected_theme_id,
|
||||||
..self
|
..self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
//! | Struct | Backend |
|
//! | Struct | Backend |
|
||||||
//! |---|---|
|
//! |---|---|
|
||||||
//! | [`LocalOnlyProvider`] | No-op; used when sync is disabled |
|
//! | [`LocalOnlyProvider`] | No-op; used when sync is disabled |
|
||||||
//! | [`SolitaireServerClient`] | Self-hosted Solitaire Quest server (JWT auth) |
|
//! | [`SolitaireServerClient`] | Self-hosted Ferrous Solitaire server (JWT auth) |
|
||||||
//!
|
//!
|
||||||
//! Use [`provider_for_backend`] to obtain a `Box<dyn SyncProvider + Send + Sync>`
|
//! Use [`provider_for_backend`] to obtain a `Box<dyn SyncProvider + Send + Sync>`
|
||||||
//! without matching on [`SyncBackend`] anywhere else in the codebase.
|
//! without matching on [`SyncBackend`] anywhere else in the codebase.
|
||||||
@@ -55,7 +55,7 @@ impl SyncProvider for LocalOnlyProvider {
|
|||||||
// SolitaireServerClient
|
// SolitaireServerClient
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
/// HTTP sync client for the self-hosted Solitaire Quest server.
|
/// HTTP sync client for the self-hosted Ferrous Solitaire server.
|
||||||
///
|
///
|
||||||
/// Authenticates via JWT stored in the OS keychain. On a 401 response the
|
/// Authenticates via JWT stored in the OS keychain. On a 401 response the
|
||||||
/// client automatically attempts a token refresh and retries the request once
|
/// client automatically attempts a token refresh and retries the request once
|
||||||
|
|||||||
@@ -418,3 +418,56 @@ async fn pull_after_account_deletion_returns_default_or_error() {
|
|||||||
|
|
||||||
let _ = delete_tokens(username);
|
let _ = delete_tokens(username);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// **Push retry on 401.**
|
||||||
|
///
|
||||||
|
/// Mirrors `jwt_refresh_on_401_succeeds` but for the `push()` path.
|
||||||
|
/// We install an expired access token so the first push attempt returns 401,
|
||||||
|
/// the client refreshes, and the retry push succeeds.
|
||||||
|
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||||
|
async fn push_retries_after_401_on_expired_access_token() {
|
||||||
|
ensure_mock_keyring();
|
||||||
|
|
||||||
|
let base = spawn_test_server().await;
|
||||||
|
let username = "rt_push_expiring";
|
||||||
|
|
||||||
|
let (_real_access, real_refresh) =
|
||||||
|
register_user_raw(&base, username, "pushexpirepass1!").await;
|
||||||
|
let user_id = decode_sub(&_real_access);
|
||||||
|
|
||||||
|
#[derive(serde::Serialize)]
|
||||||
|
struct Claims {
|
||||||
|
sub: String,
|
||||||
|
exp: usize,
|
||||||
|
kind: String,
|
||||||
|
}
|
||||||
|
let exp = (Utc::now() - chrono::Duration::hours(2)).timestamp() as usize;
|
||||||
|
let expired_access = encode(
|
||||||
|
&Header::default(),
|
||||||
|
&Claims {
|
||||||
|
sub: user_id.clone(),
|
||||||
|
exp,
|
||||||
|
kind: "access".into(),
|
||||||
|
},
|
||||||
|
&EncodingKey::from_secret(TEST_SECRET.as_bytes()),
|
||||||
|
)
|
||||||
|
.expect("failed to encode expired access token");
|
||||||
|
|
||||||
|
store_tokens(username, &expired_access, &real_refresh)
|
||||||
|
.expect("storing tokens in mock keyring must succeed");
|
||||||
|
|
||||||
|
let client = SolitaireServerClient::new(&base, username);
|
||||||
|
let payload = make_payload(&user_id, 17);
|
||||||
|
|
||||||
|
// Push: server returns 401, client refreshes, retries, succeeds.
|
||||||
|
let push_resp = client
|
||||||
|
.push(&payload)
|
||||||
|
.await
|
||||||
|
.expect("push must succeed after the client transparently refreshes the access token");
|
||||||
|
assert_eq!(
|
||||||
|
push_resp.merged.stats.games_played, 17,
|
||||||
|
"merged games_played must reflect what was pushed after auto-refresh"
|
||||||
|
);
|
||||||
|
|
||||||
|
let _ = delete_tokens(username);
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ chrono = { workspace = true }
|
|||||||
uuid = { workspace = true }
|
uuid = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
|
serde_json = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
usvg = { workspace = true }
|
usvg = { workspace = true }
|
||||||
resvg = { workspace = true }
|
resvg = { workspace = true }
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<defs>
|
||||||
|
<pattern id="dp" x="0" y="0" width="28" height="28" patternUnits="userSpaceOnUse">
|
||||||
|
<rect width="28" height="28" fill="#1a3a6e"/>
|
||||||
|
<polygon points="14,2 26,14 14,26 2,14" fill="#2255aa"/>
|
||||||
|
<polygon points="14,7 21,14 14,21 7,14" fill="#1a3a6e"/>
|
||||||
|
</pattern>
|
||||||
|
</defs>
|
||||||
|
<!-- White card background -->
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14" fill="#FAFAF8"/>
|
||||||
|
<!-- Red outer border -->
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="none" stroke="#CC1111" stroke-width="4"/>
|
||||||
|
<!-- Navy diamond pattern inset -->
|
||||||
|
<rect x="16" y="16" width="224" height="352" rx="8" ry="8" fill="url(#dp)"/>
|
||||||
|
<!-- Thin red frame around pattern -->
|
||||||
|
<rect x="16" y="16" width="224" height="352" rx="8" ry="8"
|
||||||
|
fill="none" stroke="#CC1111" stroke-width="2"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 924 B |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="11" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">10</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="11" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">10</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">2</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">2</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">3</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">3</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">4</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">4</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">5</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">5</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">6</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">6</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">7</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">7</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">8</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">8</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">9</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">9</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">A</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">A</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">J</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">J</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">K</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">K</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">Q</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">Q</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 13,4 10,7 10,10 C 10,12 11,13 12,14 C 9,14 4,17 4,21 C 4,24 7,27 10,27 C 12,27 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 20,27 22,27 C 25,27 28,24 28,21 C 28,17 23,14 20,14 C 21,13 22,12 22,10 C 22,7 19,4 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="11" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">10</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="11" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">10</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">2</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">2</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">3</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">3</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">4</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">4</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">5</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">5</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">6</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">6</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">7</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">7</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">8</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">8</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">9</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">9</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">A</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">A</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">J</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">J</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">K</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">K</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">Q</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">Q</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,2 L 30,16 L 16,30 L 2,16 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="11" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">10</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="11" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">10</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">2</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">2</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">3</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">3</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">4</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">4</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">5</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">5</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">6</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">6</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">7</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">7</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">8</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">8</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">9</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">9</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">A</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">A</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">J</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">J</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">K</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">K</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">Q</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#CC1111">Q</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,28 C 8,22 2,17 2,11 C 2,7 5,4 9,4 C 12,4 14,6 16,9 C 18,6 20,4 23,4 C 27,4 30,7 30,11 C 30,17 24,22 16,28 Z" fill="#CC1111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="11" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">10</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="11" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">10</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">2</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">2</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">3</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">3</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||||||
|
<rect x="2" y="2" width="252" height="380" rx="14" ry="14"
|
||||||
|
fill="#FAFAF8" stroke="#AAAAAA" stroke-width="1.5"/>
|
||||||
|
|
||||||
|
<!-- Top-left corner: rank label + small suit -->
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">4</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Centre: large suit, 64x64 in 256x384 card -->
|
||||||
|
<g transform="translate(96 160) scale(2)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- Bottom-right corner: mirrored via 180° rotation around card centre -->
|
||||||
|
<g transform="rotate(180 128 192)">
|
||||||
|
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||||||
|
fill="#111111">4</text>
|
||||||
|
<g transform="translate(14 50) scale(0.625)">
|
||||||
|
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#111111"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |