Added a helper function to main.js for challenge making
This commit is contained in:
@ -1570,7 +1570,7 @@
|
|||||||
"difficulty":"9.9901",
|
"difficulty":"9.9901",
|
||||||
"description":[
|
"description":[
|
||||||
"Now that we can detect when the player wins we are going to add an image to each slot depending on the random values we generate",
|
"Now that we can detect when the player wins we are going to add an image to each slot depending on the random values we generate",
|
||||||
"<code>$($('.slot')[0]).html('<img src = \"' + images[slotOne-1] + '\">');<code>"
|
"<code>$($('.slot')[0]).html('<img src = \"' + images[slotOne-1] + '\">');</code>"
|
||||||
],
|
],
|
||||||
"tests":[
|
"tests":[
|
||||||
"assert(editor.match(/\\$\\(\\$\\(\\'\\.slot\\'\\)\\[\\d\\]\\)\\.html\\(\\'\\<img\\s?src\\s?=\\s?\"\\'\\s?\\+\\s?images\\[\\w+\\-1\\]\\s?\\+\\s?\\'\"\\>\\'\\);/gi) && editor.match(/\\$\\(\\$\\(\\'\\.slot\\'\\)\\[\\d\\]\\)\\.html\\(\\'\\<img\\s?src\\s?=\\s?\"\\'\\s?\\+\\s?images\\[\\w+\\-1\\]\\s?\\+\\s?\\'\"\\>\\'\\);/gi).length >= 3, 'Use the provided code three times. One for each slot');",
|
"assert(editor.match(/\\$\\(\\$\\(\\'\\.slot\\'\\)\\[\\d\\]\\)\\.html\\(\\'\\<img\\s?src\\s?=\\s?\"\\'\\s?\\+\\s?images\\[\\w+\\-1\\]\\s?\\+\\s?\\'\"\\>\\'\\);/gi) && editor.match(/\\$\\(\\$\\(\\'\\.slot\\'\\)\\[\\d\\]\\)\\.html\\(\\'\\<img\\s?src\\s?=\\s?\"\\'\\s?\\+\\s?images\\[\\w+\\-1\\]\\s?\\+\\s?\\'\"\\>\\'\\);/gi).length >= 3, 'Use the provided code three times. One for each slot');",
|
||||||
|
Reference in New Issue
Block a user