Add pebble game interactive

Add a new interactive game where users place pebbles on an integer line from 1 to 35. The rules are:
- A pebble can only be placed on position `i` if position `i-1` has a pebble.
- Position 1 can always have a pebble placed on it.
- Users start with `n` pebbles (chosen via a slider from 2 to 5).
- The goal is to find the largest integer position for which a pebble can be placed.
This commit is contained in:
gpt-engineer-app[bot] 2025-08-21 10:45:38 +00:00
parent 927db0fcd1
commit 8917e1a66f
3 changed files with 255 additions and 0 deletions

View file

@ -10,6 +10,7 @@ import NimGame from '@/components/NimGame';
import AssistedNimGame from '@/components/AssistedNimGame';
import GoldCoinGame from '@/components/GoldCoinGame';
import GuessingGame from '@/components/GuessingGame';
import PebblePlacementGame from '@/components/PebblePlacementGame';
interface Game {
id: string;
@ -20,6 +21,13 @@ interface Game {
}
const games: Game[] = [
{
id: 'pebble-placement-game',
title: 'Pebble Placement Strategy Game',
description: 'Test your strategic thinking! Place pebbles following specific rules to reach the furthest position possible.',
tags: ['strategy', 'logic', 'game', 'placement', 'optimization', 'puzzle'],
component: PebblePlacementGame
},
{
id: 'guessing-game',
title: 'Number Guessing Game',