From 8c757b0c0d07bf66000ec5d1413ac6eafa25a83b Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 11:14:17 +0000 Subject: [PATCH] Add routing for subtraction game Add routes for the subtraction game to be accessible at `/themes/games` and `/index`. --- src/components/GamesGallery.tsx | 8 ++++++++ src/pages/Index.tsx | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/src/components/GamesGallery.tsx b/src/components/GamesGallery.tsx index 826cc55..0707472 100644 --- a/src/components/GamesGallery.tsx +++ b/src/components/GamesGallery.tsx @@ -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 SubtractionGame from '@/components/SubtractionGame'; interface Game { id: string; @@ -20,6 +21,13 @@ interface Game { } const games: Game[] = [ + { + id: 'subtraction-game', + title: 'The Subtraction Game', + description: 'A strategic two-player game where players take turns removing circles. Click on any of the last k circles to remove it and all circles to its right!', + tags: ['strategy', 'two-player', 'logic', 'game-theory', 'subtraction'], + component: SubtractionGame + }, { id: 'guessing-game', title: 'Number Guessing Game', diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index b943f53..0592756 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: 'subtraction-game', + title: 'The Subtraction Game', + description: 'A strategic two-player game where players take turns removing circles. Click on any of the last k circles to remove it and all circles to its right!', + tags: ['strategy', 'two-player', 'logic', 'subtraction'], + path: '/subtraction-game', + theme: 'Games' +}, { id: 'guessing-game', title: 'Number Guessing Game', description: 'Experience different search algorithms through interactive gameplay. Compare random, linear, and binary search strategies!',