-
Notifications
You must be signed in to change notification settings - Fork 35
Validating nested loops #334
Copy link
Copy link
Open
Description
An issue as old as time, but still is wreaking havoc on some cool challenges i've been trying to do.
This validates totally fine:
{
"id": "pattern",
"title": "Pattern",
"description": "Learn about color interactions and how shapes can affect our perception of color",
"code": "",
"startAt": 2,
"steps": [
{
"hint": "",
"solution": "for r in [0 .. 350] by 50"
},
{
"hint": "",
"solution": " offset = random 0, 1, true"
},
{
"hint": "",
"solution": " for i in [0 ... 2] by .1"
},
{
"hint": "",
"solution": " arc r, i, i - .05",
}
],
"completion_text": "",
"cover": "ozwaldboateng/pattern.png"
}
This does not:
{
"id": "pattern",
"title": "Pattern",
"description": "Learn about color interactions and how shapes can affect our perception of color",
"code": "",
"startAt": 2,
"steps": [
{
"hint": "",
"solution": "for r in [0 .. 350] by 50"
},
{
"hint": "",
"solution": " offset = random 0, 1, true"
},
{
"hint": "",
"solution": " for i in [0 ... 2] by .1"
},
{
"hint": "",
"solution": " arc r, i + offset, i - .05 + offset"
}
],
"completion_text": "",
"cover": "ozwaldboateng/pattern.png"
}The only difference between the two above JSON files is the inclusion of extra binary operators in the second example (adding an offset). Doing so in a nested loop reliably breaks validation for no clear reason.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels