Reverted to commit f61e852d45
This commit is contained in:
parent
361aaf9000
commit
9b07ffe9d9
1 changed files with 11 additions and 13 deletions
|
|
@ -78,27 +78,25 @@ const DogsBunnyPuzzle: React.FC<DogsBunnyPuzzleProps> = ({
|
|||
// Connect all locations with conditional edges
|
||||
for (let i = 0; i < locations.length; i++) {
|
||||
for (let j = i + 1; j < locations.length; j++) {
|
||||
const FREE_RATIO = 0.33;
|
||||
let conditions: string[] = [];
|
||||
if (rng() >= FREE_RATIO) {
|
||||
const numConditions = diff === 'easy' ? 1 : diff === 'medium' ? 2 : 3;
|
||||
const conditions: string[] = [];
|
||||
|
||||
for (let k = 0; k < numConditions; k++) {
|
||||
const conditionType = locationTypes[Math.floor(rng() * locationTypes.length)];
|
||||
const prefix = conditionPrefixes[Math.floor(rng() * conditionPrefixes.length)];
|
||||
conditions.push(`${prefix} ${conditionType.toUpperCase()}`);
|
||||
}
|
||||
}
|
||||
|
||||
edges.push({
|
||||
from: locations[i].id,
|
||||
to: locations[j].id,
|
||||
conditions
|
||||
conditions: conditions
|
||||
});
|
||||
|
||||
edges.push({
|
||||
from: locations[j].id,
|
||||
to: locations[i].id,
|
||||
conditions
|
||||
conditions: conditions
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -341,7 +339,7 @@ const DogsBunnyPuzzle: React.FC<DogsBunnyPuzzleProps> = ({
|
|||
</CardHeader>
|
||||
|
||||
<CardContent>
|
||||
<div className="flex flex-col gap-6">
|
||||
<div className="flex flex-col lg:flex-row gap-6">
|
||||
{/* Puzzle Area */}
|
||||
<div className="flex-1">
|
||||
<div
|
||||
|
|
@ -475,7 +473,7 @@ const DogsBunnyPuzzle: React.FC<DogsBunnyPuzzleProps> = ({
|
|||
</div>
|
||||
|
||||
{/* Instructions & Controls */}
|
||||
<div className="w-full space-y-4">
|
||||
<div className="w-full lg:w-80 space-y-4">
|
||||
<div className="space-y-2">
|
||||
<h3 className="font-semibold">How to Play:</h3>
|
||||
<ul className="text-sm text-muted-foreground space-y-1">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue