Skip to content

Commit 64c168a

Browse files
committed
盤面サイズを変更可能に
1 parent 31cf90a commit 64c168a

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

apps/frontend/app/routes/memory-optimization/room.$roomId.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -882,18 +882,18 @@ export default function RoomPage() {
882882
className="select select-bordered"
883883
defaultValue={gameState.rules.boardSize}
884884
disabled={user.id !== roomHost}
885-
// onChange={(e) =>
886-
// handleRuleChange({
887-
// rule: "boardSize",
888-
// state: parseInt(e.target.value, 10),
889-
// })
890-
// }
885+
onChange={(e) =>
886+
handleRuleChange({
887+
rule: "boardSize",
888+
state: parseInt(e.target.value, 10),
889+
})
890+
}
891891
>
892-
<option value={1}>1x1</option>
893-
<option value={2}>2x2</option>
894-
<option value={3}>3x3</option>
895-
<option value={4}>4x4</option>
896-
<option value={5}>5x5</option>
892+
{Array.from({ length: 17 }, (_, i) => i + 4).map((size) => (
893+
<option key={size} value={size}>
894+
{size}x{size}
895+
</option>
896+
))}
897897
</select>
898898
</label>
899899
</div>

0 commit comments

Comments
 (0)