Interactives
diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx
index 335f2b8..553f7ea 100644
--- a/src/pages/Index.tsx
+++ b/src/pages/Index.tsx
@@ -2,11 +2,11 @@ import { Link } from "react-router-dom";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
-import { ArrowRight, BookOpen, Puzzle, Sparkles } from "lucide-react";
+import { ArrowRight, Sparkles } from "lucide-react";
import Layout from "@/components/Layout";
-// Featured interactives to display on index page
-const featuredInteractives = [{
+// All interactives data
+const allInteractives = [{
id: 'binary-number-game',
title: 'Binary Number Representation',
description: 'Learn how numbers are represented in binary (base-2) format through an interactive guessing game.',
@@ -63,16 +63,28 @@ const featuredInteractives = [{
path: '/knights-puzzle',
theme: 'Puzzles'
}];
+
+// Featured interactives (3 fixed ones)
+const featuredInteractives = allInteractives.filter(interactive =>
+ ['northcotts-game', 'ternary-search-trick', 'game-of-sim'].includes(interactive.id)
+);
+
+// Function to get random interactives (excluding featured ones)
+const getRandomInteractives = (count: number) => {
+ const availableInteractives = allInteractives.filter(interactive =>
+ !['northcotts-game', 'ternary-search-trick', 'game-of-sim'].includes(interactive.id)
+ );
+
+ const shuffled = [...availableInteractives].sort(() => 0.5 - Math.random());
+ return shuffled.slice(0, count);
+};
const Index = () => {
+ const randomInteractives = getRandomInteractives(3);
return
{/* Hero Section */}
-
-
-
-
Discover a collection of interactive educational tools designed to supplement lectures and enhance understanding across multiple disciplines. From discrete mathematics to social choice theory.
@@ -131,6 +143,55 @@ const Index = () => {
)}
+
+
+
+ {/* Random Interactives Section */}
+
+
+
+
+
+
+ Random Interactives
+
+
+
+
+ Explore something new with these randomly selected interactives
+