Reverted to commit f61e852d45

This commit is contained in:
gpt-engineer-app[bot] 2025-08-10 07:10:24 +00:00
parent 361aaf9000
commit 9b07ffe9d9

View file

@ -78,27 +78,25 @@ const DogsBunnyPuzzle: React.FC<DogsBunnyPuzzleProps> = ({
// Connect all locations with conditional edges // Connect all locations with conditional edges
for (let i = 0; i < locations.length; i++) { for (let i = 0; i < locations.length; i++) {
for (let j = i + 1; j < locations.length; j++) { for (let j = i + 1; j < locations.length; j++) {
const FREE_RATIO = 0.33; const numConditions = diff === 'easy' ? 1 : diff === 'medium' ? 2 : 3;
let conditions: string[] = []; const conditions: string[] = [];
if (rng() >= FREE_RATIO) {
const numConditions = diff === 'easy' ? 1 : diff === 'medium' ? 2 : 3; for (let k = 0; k < numConditions; k++) {
for (let k = 0; k < numConditions; k++) { const conditionType = locationTypes[Math.floor(rng() * locationTypes.length)];
const conditionType = locationTypes[Math.floor(rng() * locationTypes.length)]; const prefix = conditionPrefixes[Math.floor(rng() * conditionPrefixes.length)];
const prefix = conditionPrefixes[Math.floor(rng() * conditionPrefixes.length)]; conditions.push(`${prefix} ${conditionType.toUpperCase()}`);
conditions.push(`${prefix} ${conditionType.toUpperCase()}`);
}
} }
edges.push({ edges.push({
from: locations[i].id, from: locations[i].id,
to: locations[j].id, to: locations[j].id,
conditions conditions: conditions
}); });
edges.push({ edges.push({
from: locations[j].id, from: locations[j].id,
to: locations[i].id, to: locations[i].id,
conditions conditions: conditions
}); });
} }
} }
@ -341,7 +339,7 @@ const DogsBunnyPuzzle: React.FC<DogsBunnyPuzzleProps> = ({
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<div className="flex flex-col gap-6"> <div className="flex flex-col lg:flex-row gap-6">
{/* Puzzle Area */} {/* Puzzle Area */}
<div className="flex-1"> <div className="flex-1">
<div <div
@ -475,7 +473,7 @@ const DogsBunnyPuzzle: React.FC<DogsBunnyPuzzleProps> = ({
</div> </div>
{/* Instructions & Controls */} {/* Instructions & Controls */}
<div className="w-full space-y-4"> <div className="w-full lg:w-80 space-y-4">
<div className="space-y-2"> <div className="space-y-2">
<h3 className="font-semibold">How to Play:</h3> <h3 className="font-semibold">How to Play:</h3>
<ul className="text-sm text-muted-foreground space-y-1"> <ul className="text-sm text-muted-foreground space-y-1">