From 4b995298e65479a2913d0a1e19e39bcd2ff5cda6 Mon Sep 17 00:00:00 2001 From: coelacanth657 <210202793+coelacanth657@users.noreply.github.com> Date: Fri, 21 Nov 2025 05:53:12 +0900 Subject: [PATCH 01/11] =?UTF-8?q?=E3=83=98=E3=83=AB=E3=83=97=E3=83=A2?= =?UTF-8?q?=E3=83=BC=E3=83=80=E3=83=AB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/components/HelpModal.svelte | 292 ++++++++++++++++++++++++++++ src/routes/+page.svelte | 7 +- 2 files changed, 297 insertions(+), 2 deletions(-) create mode 100644 src/lib/components/HelpModal.svelte diff --git a/src/lib/components/HelpModal.svelte b/src/lib/components/HelpModal.svelte new file mode 100644 index 0000000..82ae404 --- /dev/null +++ b/src/lib/components/HelpModal.svelte @@ -0,0 +1,292 @@ + + + + + + + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 2abb85e..8cca758 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -10,6 +10,7 @@ import { CodeManager } from "$lib/models/CodeManager.svelte"; import BoardModals from "$lib/components/BoardModals.svelte"; import CodeModals from "$lib/components/CodeModals.svelte"; + import HelpModal from "$lib/components/HelpModal.svelte"; import { toast } from "$lib/models/ToastStore.svelte"; import CodeMirror from "svelte-codemirror-editor"; import { javascript } from "@codemirror/lang-javascript"; @@ -26,6 +27,7 @@ let isProgress = $state(false); let isJapanese = $state(true); let resetModalOpen = $state(false); + let helpModalOpen = $state(true); let bottomDrawerOpen = $state(false); let ruleDrawerOpen = $state(false); @@ -173,8 +175,7 @@ + + + +
-
- - -
+
+
{isJapanese ? "世代数:" + generationFigure : "Generation:" + generationFigure}
-
- -
-
+
{isJapanese ? "現在の速度" : "Current speed"}: x{1000 / intervalMs}
-
- -
- -
+ +
{isJapanese ? "盤面" : "Board"}:
+
-
- + +
{isJapanese ? "コード" : "Code"}:
-
From 3ab37bdb450bc227a91ad663e2d98fe5950a26b6 Mon Sep 17 00:00:00 2001 From: coelacanth657 <210202793+coelacanth657@users.noreply.github.com> Date: Fri, 21 Nov 2025 09:06:32 +0900 Subject: [PATCH 03/11] =?UTF-8?q?=E3=82=BB=E3=83=AB=E3=81=AE=E8=89=B2?= =?UTF-8?q?=E3=81=A8isNextAlive=E9=96=A2=E6=95=B0=E3=82=92=E7=B7=A8?= =?UTF-8?q?=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iframe/life-game.js | 54 +++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/src/iframe/life-game.js b/src/iframe/life-game.js index 0daea76..6237bb5 100644 --- a/src/iframe/life-game.js +++ b/src/iframe/life-game.js @@ -3,35 +3,43 @@ let timer = "stop"; let generationFigure = 0; let isDragging = false; -let dragMode = 0; // 1: 黒にする, 0: 白にする +let dragMode = 0; // 1: 生きたセルにする, 0: 死んだセルにする let isPlacingTemplate = false; let patternShape = []; let patternHeight = 0; let patternWidth = 0; let previewCells = []; -//変数設定 -let boardSize = 20; //盤面の大きさ(20x20) -const cellSize = 600 / boardSize; //セルの大きさ(px) +//盤面の大きさ +let boardSize = 20; +const cellSize = 600 / boardSize; + +//セルの色 +const aliveCellColor = "black"; +const deadCellColor = "white"; + +//セルの誕生/生存条件 +const birthCounts = [3]; +const survivalCounts = [2, 3]; // around: 周囲の生きたセル数 self: 自身が生きているかどうか function isNextAlive(around, self) { - // 自身が生きている & 周囲が 2 か 3 で生存 - if (self && 2 <= around && around <= 3) { - return self; - } - // 自身が死んでいる & 周囲が 3 で誕生 - if (!self && around === 3) { + // 自身が死んでいる & 周囲が birthCounts で誕生 + if (!self && birthCounts.includes(around)) { return 1; } + // 自身が生きている & 周囲が survivalCounts で生存 + if (self && survivalCounts.includes(around)) { + return self; + } return 0; } // cellの状態に応じた色を返す関数 function getStyle(cell) { - if (cell === 0) return "white"; + if (cell === 0) return deadCellColor; // cellの値に応じて色を返す場合はここに追加 - return "black"; // デフォルトは黒 + return aliveCellColor; // デフォルトは黒 } //Boardの初期化 @@ -57,7 +65,7 @@ function renderBoard() { const td = document.createElement("td"); td.style.padding = "0"; const button = document.createElement("button"); - button.style.backgroundColor = board[i][j] ? "black" : "white"; //Boardの対応する値によって色を変更 + button.style.backgroundColor = board[i][j] ? aliveCellColor : deadCellColor; //Boardの対応する値によって色を変更 // ボードが大きいときは border をつけない if (boardSize >= 50) { button.style.border = "none"; @@ -67,8 +75,8 @@ function renderBoard() { } button.style.width = `${cellSize}px`; button.style.height = `${cellSize}px`; - button.style.padding = "0"; //cellSizeが小さいとき、セルが横長になることを防ぐ - button.style.display = "block"; //cellSizeが小さいとき、行間が空きすぎるのを防ぐ + button.style.padding = "0"; + button.style.display = "block"; button.onclick = () => { if (isPlacingTemplate) { clearPreview(); @@ -98,15 +106,15 @@ function renderBoard() { e.preventDefault(); if (timer === "stop" && !isPlacingTemplate) { isDragging = true; - board[i][j] = !board[i][j]; + board[i][j] = board[i][j] === 1 ? 0 : 1; dragMode = board[i][j]; - button.style.backgroundColor = board[i][j] ? "black" : "white"; + button.style.backgroundColor = board[i][j] ? aliveCellColor : deadCellColor; } }; button.onmouseenter = () => { if (isDragging && timer === "stop" && board[i][j] !== dragMode && !isPlacingTemplate) { board[i][j] = dragMode; - button.style.backgroundColor = board[i][j] ? "black" : "white"; + button.style.backgroundColor = board[i][j] ? aliveCellColor : deadCellColor; } if (isPlacingTemplate) { drawPreview(i, j); @@ -145,7 +153,7 @@ function drawPreview(row, col) { function clearPreview() { previewCells.forEach((cellPos) => { const cell = table.rows[cellPos.row].cells[cellPos.col].firstChild; - cell.style.backgroundColor = board[cellPos.row][cellPos.col] ? "black" : "white"; + cell.style.backgroundColor = board[cellPos.row][cellPos.col] ? aliveCellColor : deadCellColor; }); previewCells = []; } @@ -196,7 +204,7 @@ function progressBoard() { const newBoard = structuredClone(board); for (let i = 0; i < boardSize; i++) { for (let j = 0; j < boardSize; j++) { - //周囲のマスに黒マスが何個あるかを計算(aroundに格納)↓ + //周囲のマスに生きたセルが何個あるかを計算(aroundに格納)↓ let around = 0; let tate, yoko; if (i === 0) { @@ -220,7 +228,7 @@ function progressBoard() { } } } - //↑周囲のマスに黒マスが何個あるかを計算(aroundに格納) + //↑周囲のマスに生きたセルが何個あるかを計算(aroundに格納) newBoard[i][j] = isNextAlive(around, board[i][j]); } } @@ -244,14 +252,14 @@ on.pause = () => { }; on.board_reset = () => { - //すべて白にBoardを変更 + //すべて死んだセルにBoardを変更 board = Array.from({ length: boardSize }, () => Array.from({ length: boardSize }, () => 0)); renderBoard(); generationChange(0); }; on.board_randomize = () => { - //白黒ランダムにBoardを変更 + //生きたセル死んだセルランダムにBoardを変更 board = Array.from({ length: boardSize }, () => Array.from({ length: boardSize }, () => (Math.random() > 0.5 ? 1 : 0)), ); From 6ec05da40bb3be6f09d39a23ddcd4f90c4edf155 Mon Sep 17 00:00:00 2001 From: coelacanth657 <210202793+coelacanth657@users.noreply.github.com> Date: Fri, 21 Nov 2025 09:40:39 +0900 Subject: [PATCH 04/11] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=89=E6=99=82=E3=80=81=E4=B8=96=E4=BB=A3=E3=81=8C?= =?UTF-8?q?=EF=BC=91=E3=81=AB=E3=81=AA=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AE?= =?UTF-8?q?=E8=A7=A3=E6=B1=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iframe/life-game.js | 14 ++------------ src/routes/+page.svelte | 12 +++++------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/iframe/life-game.js b/src/iframe/life-game.js index 6237bb5..60fa541 100644 --- a/src/iframe/life-game.js +++ b/src/iframe/life-game.js @@ -267,18 +267,8 @@ on.board_randomize = () => { generationChange(0); }; -on.request_sync = () => { - window.parent.postMessage( - { - type: "sync", - data: { - generationFigure: generationFigure, - boardSize: boardSize, - }, - }, - "*", - ); - console.log("generationFigure:", generationFigure, "boardSize:", boardSize); +on.get_boardsize = () => { + window.parent.postMessage({ type: "get_boardsize", data: boardSize }, "*"); }; on.place_template = (template) => { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 3d88d11..01189c0 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -65,10 +65,10 @@ | "place_template" | "save_board" | "apply_board" - | "request_sync" + | "get_boardsize" | "progress"; - type IncomingEvent = "generation_change" | "sync" | "Size shortage" | "save_board"; + type IncomingEvent = "generation_change" | "get_boardsize" | "Size shortage" | "save_board"; function handleMessage(event: MessageEvent<{ type: IncomingEvent; data: unknown }>) { switch (event.data.type) { @@ -76,9 +76,8 @@ generationFigure = event.data.data as number; break; } - case "sync": { - const data = event.data.data as { generationFigure: number; boardSize: number }; - generationFigure = data.generationFigure; + case "get_boardsize": { + const data = event.data.data as { boardSize: number }; sizeValue = data.boardSize; break; } @@ -309,8 +308,7 @@ class="w-[80%] h-[90%] rounded-lg mx-auto my-5 bg-white shadow-lg" onload={() => { setTimeout(() => { - sendEvent("request_sync"); - console.log("generationFigure onload:", generationFigure); + sendEvent("get_boardsize"); }, 50); }} > From 07e92e9ba8c8120cbf8498e655fc077cc7eb9372 Mon Sep 17 00:00:00 2001 From: coelacanth657 <210202793+coelacanth657@users.noreply.github.com> Date: Fri, 21 Nov 2025 10:12:37 +0900 Subject: [PATCH 05/11] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E5=A4=89?= =?UTF-8?q?=E6=95=B0=E3=80=81=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iframe/life-game.js | 15 ++------------- src/routes/+page.svelte | 29 ++--------------------------- 2 files changed, 4 insertions(+), 40 deletions(-) diff --git a/src/iframe/life-game.js b/src/iframe/life-game.js index 60fa541..4615cad 100644 --- a/src/iframe/life-game.js +++ b/src/iframe/life-game.js @@ -1,6 +1,5 @@ "use strict"; -let timer = "stop"; let generationFigure = 0; let isDragging = false; let dragMode = 0; // 1: 生きたセルにする, 0: 死んだセルにする @@ -104,7 +103,7 @@ function renderBoard() { }; button.onmousedown = (e) => { e.preventDefault(); - if (timer === "stop" && !isPlacingTemplate) { + if (!isPlacingTemplate) { isDragging = true; board[i][j] = board[i][j] === 1 ? 0 : 1; dragMode = board[i][j]; @@ -112,7 +111,7 @@ function renderBoard() { } }; button.onmouseenter = () => { - if (isDragging && timer === "stop" && board[i][j] !== dragMode && !isPlacingTemplate) { + if (isDragging && board[i][j] !== dragMode && !isPlacingTemplate) { board[i][j] = dragMode; button.style.backgroundColor = board[i][j] ? aliveCellColor : deadCellColor; } @@ -243,14 +242,6 @@ on.progress = () => { progressBoard(); }; -on.play = () => { - timer = "start"; -}; - -on.pause = () => { - timer = "stop"; -}; - on.board_reset = () => { //すべて死んだセルにBoardを変更 board = Array.from({ length: boardSize }, () => Array.from({ length: boardSize }, () => 0)); @@ -277,7 +268,6 @@ on.place_template = (template) => { patternWidth = patternShape[0].length; isPlacingTemplate = true; table.style.cursor = "crosshair"; - stop(); }; on.save_board = async () => { @@ -288,5 +278,4 @@ on.apply_board = (newBoard) => { board = newBoard; renderBoard(); generationChange(0); - stop(); }; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 01189c0..0a5af7b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -24,7 +24,6 @@ let showEditor = $state(true); let preview_iframe: HTMLIFrameElement | undefined = $state(); - let isProgress = $state(false); let isJapanese = $state(true); let resetModalOpen = $state(false); let helpModalOpen = $state(true); @@ -47,10 +46,10 @@ return newDisabledState; }); - let timer: "running" | "stopped" = $state("stopped"); + let isProgress = $state(false); let intervalMs = $state(1000); $effect(() => { - if (timer === "stopped") return; + if (!isProgress) return; const timerId = setInterval(() => { sendEvent("progress"); }, intervalMs); @@ -58,8 +57,6 @@ }); type OngoingEvent = - | "play" - | "pause" | "board_reset" | "board_randomize" | "place_template" @@ -338,8 +335,6 @@ class:bg-[#E0E0E0]={templateDrawerOpen} onclick={() => { isProgress = false; - timer = "stopped"; - sendEvent("pause"); templateDrawerOpen = !templateDrawerOpen; ruleDrawerOpen = false; }} @@ -359,8 +354,6 @@ class:bg-[#E0E0E0]={ruleDrawerOpen} onclick={() => { isProgress = false; - timer = "stopped"; - sendEvent("pause"); ruleDrawerOpen = !ruleDrawerOpen; templateDrawerOpen = false; }} @@ -418,13 +411,6 @@
-

- {isJapanese ? "チュートリアル" : "Tutorial"} -

-

- {isJapanese ? "ライフゲームとは" : "What is Game of Life ?"} -

{#if isJapanese} +

チュートリアル

+

ライフゲームとは

+

ライフゲームは、1970年にイギリスの数学者ジョン・ホートン・コンウェイが考案した、生命を模した数理モデルです。
@@ -36,12 +33,13 @@

ライフゲームの4つのルール

+

+ 各セルには「生きたセル(黒)」と「死んだセル(白)」の2つの状態があります。 +
+ セルは周囲8マスの他のセルの状態によって、次の世代の状態が変わります。 +

+
    -

    - 各セルには「生きたセル(黒)」と「死んだセル(白)」の2つの状態があります。 -
    - セルは周囲8マスの他のセルの状態によって、次の世代の状態が変わります。 -

  1. 誕生: 死んだセルの周りの生きたセルが3つの場合、そのセルは次の世代で誕生し生きたセルになります。
  2. @@ -54,89 +52,25 @@
  3. 過密: 生きたセルの周りの生きたセルが4つ以上ある場合、そのセルは次の世代で過密により死んだセルになります。
  4. +
-

- ライフゲームのルール -

+

+ ライフゲームのルール +

-

- このルールは B3/S23 と簡略化して呼ばれます。 -
- B3は誕生(Born)条件が3つの生きたセル、S23は生存(Survive)条件が2つまたは3つの生きたセルという意味です。 -

- - {:else}

- The Game of Life is a mathematical model simulating life, devised by the British - mathematician John Horton Conway in 1970. -
- The grid-like board is a field where life propagates, and the black squares represent living - entities. + このルールは B3/S23 と簡略化して呼ばれます。
- These entities are called cells, conceived as a colony of bacteria. -
- A cell can survive by mutual assistance if a suitable number of other cells are present around - it. -
- It can also crossbreed with neighboring cells to create new ones. -
- Let's observe how the distribution of cells changes and grows more complex over time! + B3は誕生(Born)条件が3つの生きたセル、S23は生存(Survive)条件が2つまたは3つの生きたセルという意味です。

-

The Four Rules of Life Game

- -
    -

    - Each cell has two states: "alive (black)" and "dead (white)". -
    - A cell's state in the next generation changes depending on the state of the other cells in - its surrounding 8 squares. -

    -
  1. - Birth: A dead cell becomes an alive cell in the next generation if it has - 3 alive neighbors. -
  2. -
  3. - Survival: An alive cell survives into the next generation if it has 2 or - 3 alive neighbors. -
  4. -
  5. - Underpopulation: An alive cell dies due to underpopulation in the next generation - if it has 1 or fewer alive neighbors. -
  6. -
  7. - Overpopulation: An alive cell dies due to overpopulation in the next generation - if it has 4 or more alive neighbors. -
  8. - -

    - Game of Life Rules -

    - -

    - This set of rules is often called B3/S23 in shorthand. -
    - B3 means the Born condition requires 3 alive neighbors, and S23 means the Survive condition - requires 2 or 3 alive neighbors. -

    -
- {/if} - -
- -

- {isJapanese ? "画面の構成と操作方法" : "Screen Layout and Operation"} -

+
- {#if isJapanese} +

画面の構成と操作方法

-

① 画面の構成

-
    +

    ① 画面の構成:

    +
    • 中央の盤面: セルが繁殖するフィールドです。クリックまたはドラッグでセルの状態を変更できます。
    • @@ -199,7 +133,123 @@
    • 疑問符アイコン: このヘルプ画面をいつでも再表示できます。
    • 言語アイコン: 表示言語(日本語/英語)を切り替えます。
    + +
    + +

    次に何をするかお悩みの方へ

    +

    ライフコードをより深く楽しむための5つのステップをご紹介します。

    +
      +
    • + オリジナルルールで遊ぶ +

      + まずは、オリジナルのライフゲームで遊んでみましょう。セルをドラッグして配置したり、「ランダム」ボタンを押したりして、セルの動きを観察してください。速さは自由に変えられます。 +

      +
    • +
    • + 有名なパターンを配置する +

      + 次に、画面下の「テンプレート」ボタンから、有名なライフゲームのパターンを配置してみましょう。盤面サイズが足りない場合は、右側のコードエディター内の//盤面の大きさ + の boardSize + を変更してください。緑色に光った「適用」ボタンを押すと編集したコードが反映されます。 +

      +
    • +
    • + カスタムルールを体験する +

      + 次に、画面下の「ルール選択」ボタンから、ut.code(); + のチームが作成したライフゲームのルールを適用して遊んでみましょう。 +

      +
    • +
    • + コードを編集してルールを変える +

      + まずは、//セルの色 の "black" や "white" を、"red", "blue", "green", "yellow", "pink", + "skyblue" などの他の色に変更し、「適用」ボタンを押してみましょう。 +
      次に、//セルの誕生/生存条件 の birthCounts や survivalCounts + の中身を変更してみましょう。 +
      たとえば、birthCounts = [3]; survivalCounts = [0, 1, 2, 3, 4]; + にしたらどうなるでしょうか。「ランダム」ボタンを押して、セルの分布がどう変化するか見てみましょう! +

      +
    • +
    • + 作品を保存・共有する +

      + 自分で作った盤面やコードを保存して、他のユーザーに見てもらいましょう。また、他のユーザーが作った盤面やコードを読み込んで遊びましょう。 +

      +
    • +
    + +

    + さあ、あなただけのライフゲームを作って遊びましょう! +

    {:else} +

    Tutorial

    +

    What is Game of Life ?

    + +

    + The Game of Life is a mathematical model simulating life, devised by the British + mathematician John Horton Conway in 1970. +
    + The grid-like board is a field where life propagates, and the black squares represent living + entities. +
    + These entities are called cells, conceived as a colony of bacteria. +
    + A cell can survive by mutual assistance if a suitable number of other cells are present around + it. +
    + It can also crossbreed with neighboring cells to create new ones. +
    + Let's observe how the distribution of cells changes and grows more complex over time! +

    + +

    The Four Rules of Life Game

    + +

    + Each cell has two states: "alive (black)" and "dead (white)". +
    + A cell's state in the next generation changes depending on the state of the other cells in + its surrounding 8 squares. +

    + +
      +
    1. + Birth: A dead cell becomes an alive cell in the next generation if it has + 3 alive neighbors. +
    2. +
    3. + Survival: An alive cell survives into the next generation if it has 2 or + 3 alive neighbors. +
    4. +
    5. + Underpopulation: An alive cell dies due to underpopulation in the next generation + if it has 1 or fewer alive neighbors. +
    6. +
    7. + Overpopulation: An alive cell dies due to overpopulation in the next generation + if it has 4 or more alive neighbors. +
    8. +
    + +

    + Game of Life Rules +

    + +

    + This set of rules is often called B3/S23 in shorthand. +
    + B3 means the Born condition requires 3 alive neighbors, and S23 means the Survive condition + requires 2 or 3 alive neighbors. +

    + +
    + +

    Screen Layout and Operation

    +

    Questionmark Icon: Reopens this help screen at any time.

  • Language Icon: Toggles the display language (Japanese/English).
- {/if} -

- {isJapanese - ? "さあ、あなただけのライフゲームを作って遊びましょう!" - : "Enjoy creating your own game of life!"} -

+

Stuck on What to Do Next?

+

Here are five steps to enjoy Life Code more deeply.

+
    +
  1. + Play with the Original Game of Life +

    + Start by playing with the original Game of Life. Try dragging to place cells or + pressing the "Random" button to observe the cell movements. You can change the speed + freely. +

    +
  2. +
  3. + Place Famous Patterns +

    + Next, press the "Template" button at the bottom of the screen to place famous Game of + Life patterns. If the board size is insufficient, modify boardSize under + //盤面の大きさ in the code editor on the right. Press the green "Apply" button to + reflect your edited code. +

    +
  4. +
  5. + Try Custom Rules +

    + Next, use the "Select Rule" button at the bottom of the screen to apply custom Game of + Life rules created by the ut.code(): team. +

    +
  6. +
  7. + Edit the Code and Change the Rules +

    + First, try changing "black" or "white" under //セルの色 to another color, such as + "red", "blue", "green", "yellow", "pink", or "skyblue", and then press the "Apply" + button. +
    Next, try changing the contents of birthCounts and survivalCounts under + //セルの誕生/生存条件. For example, what happens if you set birthCounts = [3]; + survivalCounts = [0, 1, 2, 3, 4]; ? Press the "Random" button and see how the cell + distribution changes! +

    +
  8. +
  9. + Save and Share Your Creations +

    + Save your custom boards and code to share them with other users. You can also load and + play with boards and code created by other users. +

    +
  10. +
+ +

+ Enjoy creating your own game of life! +

+ {/if}
From 709ae1002bce50ac21ba89ee81e8f82de8a23ab8 Mon Sep 17 00:00:00 2001 From: coelacanth657 <210202793+coelacanth657@users.noreply.github.com> Date: Fri, 21 Nov 2025 15:49:01 +0900 Subject: [PATCH 10/11] =?UTF-8?q?=E5=BE=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/components/HelpModal.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/HelpModal.svelte b/src/lib/components/HelpModal.svelte index 4c5f188..de5f411 100644 --- a/src/lib/components/HelpModal.svelte +++ b/src/lib/components/HelpModal.svelte @@ -259,7 +259,7 @@

1. Screen Layout

-
    +
    • Center Board: This is the field where cells propagate. Click or drag to change a cell's state. From cf1e1e63d2cb02680f523c634db2eeceaf169ef6 Mon Sep 17 00:00:00 2001 From: coelacanth657 <210202793+coelacanth657@users.noreply.github.com> Date: Fri, 21 Nov 2025 20:36:42 +0900 Subject: [PATCH 11/11] =?UTF-8?q?=E5=A4=89=E6=95=B0=E5=90=8D=E3=81=AE?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/+page.svelte | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 5b4fb40..59e190a 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -46,10 +46,10 @@ return newDisabledState; }); - let isProgress = $state(false); + let timerIsRunnning = $state(false); let intervalMs = $state(1000); $effect(() => { - if (!isProgress) return; + if (!timerIsRunnning) return; const timerId = setInterval(() => { sendEvent("progress"); }, intervalMs); @@ -334,7 +334,7 @@ class:bg-base-200={!templateDrawerOpen} class:bg-[#E0E0E0]={templateDrawerOpen} onclick={() => { - isProgress = false; + timerIsRunnning = false; templateDrawerOpen = !templateDrawerOpen; ruleDrawerOpen = false; }} @@ -353,7 +353,7 @@ class:bg-base-200={!ruleDrawerOpen} class:bg-[#E0E0E0]={ruleDrawerOpen} onclick={() => { - isProgress = false; + timerIsRunnning = false; ruleDrawerOpen = !ruleDrawerOpen; templateDrawerOpen = false; }} @@ -415,10 +415,10 @@ @@ -430,7 +430,7 @@