From 1ad16d355cae37c7192cb4bc7546d8454c60f680 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 10 Aug 2025 15:51:03 +0000 Subject: [PATCH] Add guessing game to data structures Add the guessing game component to the "Data Structures and Algorithms" theme and update the index to include it. --- src/components/InteractiveGallery.tsx | 8 ++++++++ src/pages/Index.tsx | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/src/components/InteractiveGallery.tsx b/src/components/InteractiveGallery.tsx index 6bac58f..1086712 100644 --- a/src/components/InteractiveGallery.tsx +++ b/src/components/InteractiveGallery.tsx @@ -6,6 +6,7 @@ import { Search } from 'lucide-react'; import Layout from '@/components/Layout'; import BinarySearchTrick from '@/components/BinarySearchTrick'; import TernarySearchTrick from '@/components/TernarySearchTrick'; +import GuessingGame from '@/components/GuessingGame'; interface Interactive { id: string; @@ -16,6 +17,13 @@ interface Interactive { } const interactives: Interactive[] = [ + { + id: 'guessing-game', + title: 'Number Guessing Game', + description: 'Experience different search algorithms through interactive gameplay. Compare random, linear, and binary search strategies!', + tags: ['algorithms', 'search', 'educational', 'interactive', 'binary-search', 'computer-science'], + component: GuessingGame + }, { id: 'binary-search-trick', title: 'Binary Search Magic Trick', diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index e9e6c0c..b943f53 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -7,6 +7,13 @@ import Layout from "@/components/Layout"; // All interactives data const allInteractives = [{ + id: 'guessing-game', + title: 'Number Guessing Game', + description: 'Experience different search algorithms through interactive gameplay. Compare random, linear, and binary search strategies!', + tags: ['algorithms', 'search', 'educational', 'interactive'], + path: '/games/guessing', + theme: 'Data Structures' +}, { id: 'binary-number-game', title: 'Binary Number Representation', description: 'Learn how numbers are represented in binary (base-2) format through an interactive guessing game.',