(t8n: 'fade')[Hello, GCSE A-Levels Chemistry student.
There is a bomb inside you that you cannot defuse unless you (link-reveal: 'play my game.')[
(t8n: 'fade')[You are in an infinitely looping chemistry lab, where you can access various labs dedicated to different types of organic chemistry reactions.<br><br>You will be given an organic synthesis pathway to carry out in a set number of steps. You must follow the synthesis pathway by entering the labs for the correct reactions and collecting the correct reagents in each room.<br><br>If your final product is wrong or you don't ''complete 5 reactions correctly within 3 minutes'', the bomb will explode.<br><br>//If your reaction doesn't apply to the current substance, no reaction will happen and you will be returned to the main lab without your number of steps being affected.<br>You may see an undo button on your screen; this is non-functional to prevent cheating, as undoing a turn also resets the timer.//
<br>(link: 'Click here if you\'re ready.')[(display:'GEN')]
<br>Play [[practice mode->PRACTICE]] where you can choose your synthesis pathway.]
]
]
(display: 'UI')
{(set: _one to (ds: '12', '13', '17', '113', '114', '21', '23', '25', '26', '27', '28', '31', '32', '34', '39', '47', '49', '52', '54', '57', '62', '72', '78', '712', '82', '87', '910', '109', '1012'))
(set: _two to (ds: '14', '15', '16', '18', '19', '112', '24', '29', '212', '213', '214', '35', '36', '37', '38', '310', '313', '314', '42', '410', '412', '51', '53', '56', '58', '59', '512', '61', '63', '65', '67', '68', '71', '73', '75', '76', '710', '81', '83', '85', '86', '812'))
(set: _three to (ds: '110', '210', '312', '41', '43', '45', '46', '510', '513', '514', '64', '69', '612', '613', '614', '74', '79', '713', '714', '84', '89', '810', '813', '814', '97', '98'))
(set: _four to (ds: '413', '414', '610', '92', '1213', '1214'))
(set: _five to (ds: '91', '93', '95', '96', '1013', '1014'))
(set: _six to (ds: '94', '913', '914'))
You go to...
<br>[[Electrophilic addition lab.->E ADD]]<br>[[Electrophilic substitution lab.->E SUB]]<br>[[Nucleophilic reactions lab.->NUC]]<br>[[Redox lab.->REDOX]]<br>[[Hydrolysis lab.->HYDROL]]<br>[[Elimination lab.->ELIM]]<br><br>(link-reveal: 'Reset pathway.')[(set: $current to $reactant)(set: $steps to (cond: $code is in _one, 1, it is in _two, 2, it is in _three, 3, it is in _four, 4, it is in _five, 5, 6))] //Resets your reactant and steps, but ''not'' your timer.//
(if: $practice is false)[
(event: when $steps is 0)[(if: $current is $product)
[(go-to: 'WIN')](else:)[(go-to: 'DEATH')]]]
(else:)[
(event: when $steps is 0)[(if: $current is $product)
[(go-to: 'WIN')](else:)[(go-to: 'RETRY')]]]
(set: $inv to (ds:))(set: $conditions to 'room temperature')}
{(display: 'UI')
(display: 'instruction')
(display: 'subs')One table holds bottles of (link-reveal: 'KMnO4')[(set: $inv to $inv+(ds:'KMnO4'))], (link-reveal: 'K2Cr2O7')[(set: $inv to it+(ds:'K2Cr2O7'))], (link-reveal: 'H2SO4')[(set: $inv to it+(ds:'H2SO4'))], as well as the set-up for immediate distillation.<br>
<br>The other table has (link-reveal: 'LiAlH4')[(set: $inv to it+(ds:'LiAlH4'))], (link-reveal: 'NaBH4 in ethanol')[(set: $inv to it+(ds:'NaBH4 in ethanol'))], and (link-reveal: 'bottled H2 gas')[(set: $inv to it+(ds:'bottled H2 gas'))] with its assorted catalysts.
<br>
<br>[[Return to the main lab. ->MAIN LAB]]
<!--OXIDATION-->
(event: when $inv matches (ds: 'KMnO4', 'H2SO4') and $conditions is 'heat')[
(if: $current is 'an alcohol')[(dialog: bind _degree, 'What class of alcohol are you oxidising?', 'Primary', 'Secondary', 'Cancel')
(if: _degree is 'Primary')[(go-to: 'carboxylic acid')]
(else-if: _degree is 'Secondary')[(go-to: 'ketone')]
(else-if: _degree is 'Cancel')[(go-to: 'MAIN LAB')]
]
(else-if: $current is 'an aldehyde')[(go-to: 'carboxylic acid')]
(else-if: $current is 'an alkene')[(dialog: bind _alkyls, 'How many alkyls are on your C=C carbon?', 'One', 'Two', 'Cancel')
(if: _alkyls is 'One')[(go-to: 'carboxylic acid')]
(else-if: _alkyls is 'Two')[(go-to: 'aldehyde')]
(else-if: _alkyls is 'Cancel')[(go-to: 'MAIN LAB')]
]
(else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'K2Cr2O7', 'H2SO4') and $conditions is 'heat')[
(if: $current is 'an alcohol'[(dialog: bind _degree, 'What class of alcohol are you oxidising?', 'Primary', 'Secondary', 'Cancel')
(if: _degree is 'Primary')[(go-to: 'carboxylic acid')]
(else-if: _degree is 'Secondary')[(go-to: 'ketone')]
(else-if: _degree is 'Cancel')[(go-to: 'MAIN LAB')]
]
(else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'K2Cr2O7', 'H2SO4') and $conditions is 'immediate distillation')[(if: $current is 'an alcohol')[(go-to: 'aldehyde')](else:)[(go-to: 'error')]]
<!--REDUCTION-->
(event: when $inv matches (ds: 'LiAlH4') and $conditions is 'room temperature')[
(if: $current is 'an aldehyde' or 'a ketone' or 'a carboxylic acid' or 'an ester')[(go-to: 'alcohol')]
(else-if: $current is 'a nitrile' or 'an amide')[(go-to: 'amine')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'bottled H2 gas') and $conditions is 'room temperature')[
(if: $current is 'a nitrile')[(go-to: 'amine')]
(else-if: $current is 'an aldehyde' or 'a ketone')[(go-to: 'alcohol')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'NaBH4 in ethanol') and $conditions is 'room temperature')[(if: $current is 'an aldehyde' or 'a ketone')[(go-to: 'alcohol')](else:)[(go-to: 'error')]]}
{ (box: '=XXXXX=', 4)+(border: 'solid')+(corner-radius:20)[
You currently have (live: 0.3s)[$current]. Your target is (live: 0.3s)[$product]. (live: 0.3s)[(if: $inv is not an empty)[ <br>You are holding (joined: ', ', ...$inv).]]]
(append: ?sidebar)[(icon-counter: bind $steps, 'step left', 'steps left')]
(if: $practice is false)[(prepend: ?sidebar)[(icon-counter: bind $timer, 'Timer')]]
(if: $code is 0 or $practice is true)[(stop:)]
(else:)[(live: 1s)[(set: $timer to it - 1)]
(event: when $timer is 0)[(if: $wins >= 5)
[(go-to: 'RESULTS')](else:)[(go-to: 'DEATH')]]]
}(enchant: '1', (text-style: 'Subscript'))(enchant: '2', (text-style: 'Subscript'))(enchant: '3', (text-style: 'Subscript'))(enchant: '4', (text-style: 'Subscript'))(enchant: '5', (text-style: 'Subscript'))(enchant: '6', (text-style: 'Subscript'))(enchant: '7', (text-style: 'Subscript'))(enchant: '8', (text-style: 'Subscript'))(enchant: '9', (text-style: 'Subscript'))$small[You now have a carboxylic acid.(set: $current to 'a carboxylic acid')(display: 'stepdone')]{(display: 'UI')(display: 'instruction')(display: 'subs')The table holds bottles of (link-reveal: 'gaseous HCl')[(set: $inv to $inv+(ds: 'gaseous HCl'))], (link-reveal: 'Cl2 in tetrachloromethane')[(set: $inv to $inv+(ds: 'Cl2 in CCl4'))], (link-reveal: 'aqueous Cl2')[(set: $inv to $inv+(ds: 'aqueous Cl2'))], (link-reveal: 'concentrated H2SO4')[(set: $inv to $inv+(ds: 'concentrated H2SO4'))] and (link-reveal: 'H2O')[(set: $inv to $inv+(ds: 'H2O'))].
<!--ELECTROPHILIC RXN-->
(event: when $inv matches (ds: 'gaseous HCl') and $conditions is 'room temperature')[(if: $current is 'an alkene')[(go-to: 'halogenoalkane')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'Cl2 in CCl4') and $conditions is 'room temperature without UV light')[(if: $current is 'an alkene')[(go-to: 'alkyl dihalide')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'aqueous Cl2') and $conditions is 'room temperature')[(if: $current is 'an alkene')[(go-to: 'halohydrin')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'concentrated H2SO4', 'H2O') and $conditions is 'cool then warm')[(if: $current is 'an alkene')[(go-to: 'alcohol')](else:)[(go-to: 'error')]]
<br>
<br>[[Return to the main lab. ->MAIN LAB]]
}(display: 'UI')(display: 'instruction')(display: 'subs')There is only a bottle of (link-reveal: 'aqueous NaOH')[(set: $inv to $inv+(ds:'aqueous NaOH'))] here.
<br><br>[[Return to the main lab. ->MAIN LAB]]
(event: when $inv matches (ds: 'aqueous NaOH') and $conditions is 'heat')[(if: $current is 'a halogenoalkane')[(go-to: 'alcohol')](else:)[(go-to: 'error')]]
(display: 'UI')(display: 'instruction')(display: 'subs'){
[A table for reagents holds bottles of (link-reveal: 'HBr')[(set: $inv to it + (ds: 'HBr'))], (link-reveal: 'concentrated HCl')[(set: $inv to it + (ds: 'concentrated HCl'))], (link-reveal: 'anhydrous PCl3')[(set: $inv to it + (ds: 'anhydrous PCl3'))], (link-reveal: 'anhydrous PCl5')[(set: $inv to it + (ds: 'anhydrous PCl5'))], (link-reveal: 'anhydrous SOCl2')[(set: $inv to it + (ds: 'anhydrous SOCl2'))], (link-reveal: 'NaCN')[(set: $inv to it + (ds: 'NaCN'))], (link-reveal: 'HCN')[(set: $inv to it + (ds: 'HCN'))], (link-reveal: 'NH3')[(set: $inv to it + (ds: 'NH3'))], and (link-reveal: 'ethanol')[(set: $inv to it + (ds: 'ethanol'))].
<br>
<br>Another table for catalysts holds bottles of (link-reveal: 'concentrated H2SO4')[(set: $inv to it + (ds: 'concentrated H2SO4'))] and (link-reveal: 'ZnCl2')[(set: $inv to it + (ds: 'ZnCl2'))].
<br>
<br>The front bench holds containers of premade organic substances, namely (link-reveal: 'ethanoic acid')[(set: $inv to it + (ds: 'ethanoic acid'))], (link-reveal: 'ethanoyl chloride')[(set: $inv to it + (ds: 'ethanoyl chloride'))] and its (link-reveal: 'anhydrous ethanoyl chloride')[(set: $inv to it + (ds: 'anhydrous ethanoyl chloride'))], and (link-reveal: 'ethylamine')[(set: $inv to it + (ds: 'ethylamine'))].]<desc|
<!--NUCLEOPHILIC SUB-->
(event: when $inv matches (ds: 'concentrated HCl', 'ZnCl2') and $conditions is 'heat')[(if: $current is 'an alcohol')[(go-to: 'halogenoalkane')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'anhydrous PCl3') and $conditions is 'heat')[(if: $current is 'an alcohol')[(go-to: 'halogenoalkane')](else-if: $current is 'a carboxylic acid')[(go-to: 'acyl chloride')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'anhydrous SOCl2') and $conditions is 'heat')[(if: $current is 'an alcohol')[(go-to: 'halogenoalkane')](else-if: $current is 'a carboxylic acid')[(go-to: 'acyl chloride')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'HBr') and $conditions is 'room temperature')[(if: $current is 'an alcohol')[(go-to: 'halogenoalkane')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'anhydrous PCl5') and $conditions is 'room temperature')[(if: $current is 'an alcohol')[(go-to: 'halogenoalkane')](else-if: $current is 'a carboxylic acid')[(go-to: 'acyl chloride')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'NH3', 'ethanol') and $conditions is 'heat in a sealed tube')[(if: $current is 'a halogenoalkane')[(go-to: 'amine')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'ethylamine', 'ethanol') and $conditions is 'heat in a sealed tube')[(if: $current is 'a halogenoalkane')[(go-to: 'amine')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'anhydrous ethanoyl chloride') and $conditions is 'room temperature')[(if: $current is 'an amine')[(go-to: 'amide')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'ethylamine') and $conditions is 'room temperature')[(if: $current is 'an acyl chloride')[(go-to: 'amide')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'NaCN', 'ethanol') and $conditions is 'heat')[(if: $current is 'a halogenoalkane')[(go-to: 'nitrile')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'ethanoic acid', 'concentrated H2SO4') and $conditions is 'heat')[(if: $current is 'an alcohol')[(go-to: 'ester')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'ethanol', 'concentrated H2SO4') and $conditions is 'heat')[(if: $current is 'a carboxylic acid')[(go-to: 'ester')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'ethanoyl chloride') and $conditions is 'room temperature')[(if: $current is 'an alcohol')[(go-to: 'ester')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'ethanol') and $conditions is 'room temperature')[(if: $current is 'an acyl chloride')[(go-to: 'ester')](else:)[(go-to: 'error')]]
<!--NUCLEOPHILIC ADD-->
(event: when $inv matches (ds: 'NaCN', 'HCN') and $conditions is 'cold')[(if: $current is 'an aldehyde')[(go-to: 'nitrile')](else:)[(go-to: 'error')]]
}
[[Return to the main lab. ->MAIN LAB]]{(display: 'UI')(display: 'instruction')(display: 'subs')One table holds bottles of (link-reveal: 'H2O')[(set: $inv to $inv+(ds:'H2O'))], (link-reveal: 'HCl')[(set: $inv to it+(ds:'HCl'))],(link-reveal: 'H2SO4')[(set: $inv to it+(ds:'H2SO4'))], (link-reveal: 'NaOH')[(set: $inv to it+(ds:'NaOH'))] and (link-reveal: 'KOH')[(set: $inv to it+(ds:'KOH'))].
<br>
<br>[[Return to the main lab. ->MAIN LAB]]
<!--HYDROLYSIS-->
(event: when $inv matches (ds: 'H2O') and $conditions is 'room temperature')[(if: $current is 'an acyl chloride')[(go-to: 'carboxylic acid')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'HCl') and $conditions is 'heat')[
(if: $current is 'a nitrile')[(go-to: 'carboxylic acid')]
(else-if: $current is 'an amide')[
(dialog: bind _keep, 'Which product will you keep?', 'Amine', 'Acyl chloride', 'Cancel')
(if: _keep is 'Amine')[(go-to: 'amine')]
(else-if: _keep is 'Acyl chloride')[(go-to: 'acyl chloride')]
(else-if: _keep is 'Cancel')[(go-to: 'MAIN LAB')]
]
(else:)[(go-to: 'error')]
]
(event: when $inv matches (ds: 'H2SO4') and $conditions is 'heat')[
(if: $current is 'a nitrile')[(go-to: 'carboxylic acid')]
(else-if: $current is 'an amide')[
(dialog: bind _keep, 'Which product will you keep?', 'Amine', 'Acyl chloride', 'Cancel')
(if: _keep is 'Amine')[(go-to: 'amine')]
(else-if: _keep is 'Acyl chloride')[(go-to: 'acyl chloride')]
(else-if: _keep is 'Cancel')[(go-to: 'MAIN LAB')]
]
(else-if: $current is 'an ester')[(go-to: 'carboxylic acid')]
(else:)[(go-to: 'error')]
]
}
$small[You now have a ketone.(set: $current to 'a ketone')(display: 'stepdone')]<br>(link: 'Return to the main lab.')[(set: $steps to it - 1)(go-to: 'MAIN LAB')]You now have a halogenoalkane.(set: $current to 'a halogenoalkane')(display: 'stepdone')(align: '=><=')+(border: 'dashed')+(border-colour: red)+(corner-radius: 10)+(colour: red)[No reaction happened.]
[[Return to the lab.->MAIN LAB]]$small[You now have an aldehyde.(set: $current to 'an aldehyde')(display: 'stepdone')]$small[You now have an amine.(set: $current to 'an amine')(display: 'stepdone')]$small[You now have an alcohol.(set: $current to 'an alcohol')(display: 'stepdone')]$small[You now have an acyl chloride.(set: $current to 'an acyl chloride')(display: 'stepdone')]$small[You now have an ester.(set: $current to 'an ester')(display: 'stepdone')]$small[You now have a nitrile.(set: $current to 'a nitrile')(display: 'stepdone')]$small[You now have an amide.(set: $current to 'an amide')(display: 'stepdone')]{ (set: _one to (ds: '12', '13', '17', '113', '114', '21', '23', '25', '26', '27', '28', '31', '32', '34', '39', '47', '49', '52', '54', '57', '62', '72', '78', '712', '82', '87', '910', '109', '1012'))
(set: _two to (ds: '14', '15', '16', '18', '19', '112', '24', '29', '212', '213', '214', '35', '36', '37', '38', '310', '313', '314', '42', '410', '412', '51', '53', '56', '58', '59', '512', '61', '63', '65', '67', '68', '71', '73', '75', '76', '710', '81', '83', '85', '86', '812'))
(set: _three to (ds: '110', '210', '312', '41', '43', '45', '46', '510', '513', '514', '64', '69', '612', '613', '614', '74', '79', '713', '714', '84', '89', '810', '813', '814', '97', '98'))
(set: _four to (ds: '413', '414', '610', '92', '1213', '1214'))
(set: _five to (ds: '91', '93', '95', '96', '1013', '1014'))
(set: _six to (ds: '94', '913', '914'))
(set: $practice to true)
Click on the links to cycle through possible reactants. Once you choose a valid pathway, you can start synthesis. This mode is (colour: green)[''not timed''], but you will not receive any scores.
<br>Start with: (cycling-link: bind $reactant, 'an alkene', 'a halogenoalkane', 'an alkyl dihalide', 'a halohydrin', 'an alcohol', 'a nitrile', 'an aldehyde', 'a ketone', 'a carboxylic acid', 'an ester', 'an amine', 'an amide', 'an acyl chloride'). End with: (cycling-link: bind $product, 'an alkene', 'a halogenoalkane', 'an alkyl dihalide', 'a halohydrin', 'an alcohol', 'a nitrile', 'an aldehyde', 'a ketone', 'a carboxylic acid', 'an ester', 'an amine', 'an amide', 'an acyl chloride').
(set: _subs2 to (dm: 'an alkene', 1, 'an alcohol', 2, 'a halogenoalkane', 3, 'a nitrile', 4, 'an aldehyde', 5, 'a ketone', 6, 'a carboxylic acid', 7, 'an ester', 8, 'an amine', 9, 'an amide', 10, 'an acyl chloride', 12, 'an alkyl dihalide', 13, 'a halohydrin', 14))
(live: 0.3s)[(set: num-type _reano to $reactant of _subs2)(set: num-type _prodno to $product of _subs2)(set: $code to (joined:'',(digit-format: '##', _reano),(digit-format: '##', _prodno)))(set: $steps to (cond: $code is in _one, 1, it is in _two, 2, it is in _three, 3, it is in _four, 4, it is in _five, 5, it is in _six, 6, 0))(set: $current to $reactant)<br>Steps to complete in: (if: $steps is 0)[(colour: red)[invalid pathway]](else:)[$steps]. ($code)]
(live: 0.5s)[(if: $steps is not 0)[<br>[[Start synthesis.->MAIN LAB]]]]<br><br>[[Return to challenge mode.->START]] }<br>Click on a highlighted substance to add it to your reaction.<br><br>Click on the current condition to cycle through possible conditions. //(Recommended to change the conditions before picking reagents, to avoid triggering the wrong reaction.)//<br>(box:"XXX==")[(align:"<=")+(border: 'solid')+(corner-radius:10)[Condition: (cycling-link: 2bind $conditions, 'room temperature', 'heat', 'room temperature without UV light', 'immediate distillation', 'cold', 'cool then warm', 'heat in a sealed tube')]]{
(display: 'UI')
(t8n: 'fade-right')+(size: 2.5)+(colour: green)[Pathway complete!]
(set: $code to 0)
(if: $practice is false)[(set: $1stwin to true)(set: $wins to it + 1)<br>Try this now.<br>(display: 'GEN')<br>[[End game here.->RESULTS]]]
(else:)[<br>Ready for the real thing?
<br>(link: 'I\'m ready!')[<br>Try this now.<br>(display: 'GEN')]
<br>[[I want more practice.->PRACTICE]]]
}Your pathway was wrong and the bomb exploded.(t8n-delay: 1s)+(t8n: 'fade')+(t8n-time: 5s)[(colour: red)+(size: 2.5)[<br>YOU ARE DEAD.]<br>(link-reveal: 'Try again.')[(restart:)] //(Starts you back at the beginning.)//]{ (set: _one to (ds: '12', '13', '17', '113', '114', '21', '23', '25', '26', '27', '28', '31', '32', '34', '39', '47', '49', '52', '54', '57', '62', '72', '78', '712', '82', '87', '910', '109', '1012'))
(set: _two to (ds: '14', '15', '16', '18', '19', '112', '24', '29', '212', '213', '214', '35', '36', '37', '38', '310', '313', '314', '42', '410', '412', '51', '53', '56', '58', '59', '512', '61', '63', '65', '67', '68', '71', '73', '75', '76', '710', '81', '83', '85', '86', '812'))
(set: _three to (ds: '110', '210', '312', '41', '43', '45', '46', '510', '513', '514', '64', '69', '612', '613', '614', '74', '79', '713', '714', '84', '89', '810', '813', '814', '97', '98'))
(set: _four to (ds: '413', '414', '610', '92', '1213', '1214'))
(set: _five to (ds: '91', '93', '95', '96', '1013', '1014'))
(set: _six to (ds: '94', '913', '914'))
|synth>[(live: 0.3s)[
(if: $code is in _one or _two or _three or _four or _five or _six)[
($code) Synthesise $product from $reactant in $steps (if: $steps is not 1)[steps](else:)[step].
<br>(link: 'Start synthesis.')[(set: $practice to false)(if: $1stwin is false)[(set: $timer to 180)](go-to: 'MAIN LAB')]
<br>(link-rerun: 'Get another pathway.')[(set: $code to 0)(rerun:?synth)](stop:)]
(else:)[Generating pathway. . .
(put: $substances's (random: 1,14) into $product)(put: $substances's (random: 1,14) into $reactant)
(set: _subs2 to (dm: 'an alkene', 1, 'an alcohol', 2, 'a halogenoalkane', 3, 'a nitrile', 4, 'an aldehyde', 5, 'a ketone', 6, 'a carboxylic acid', 7, 'an ester', 8, 'an amine', 9, 'an amide', 10, 'an acyl chloride', 12, 'an alkyl dihalide', 13, 'a halohydrin', 14)
)
(set: num-type _reano to $reactant of _subs2)(set: num-type _prodno to $product of _subs2)(set: $code to (joined:'',(digit-format: '##', _reano),(digit-format: '##', _prodno)))
(set: $steps to (cond: $code is in _one, 1, it is in _two, 2, it is in _three, 3, it is in _four, 4, it is in _five, 5, 6))
(set: $current to $reactant)]]]
<!--11 and other same-digit numbers will be skipped as '1+11' (alkene to acyl chloride) and '11+1' (acyl chloride to alkene) will be read as the same reaction, etc.--> }(border: 'solid')+(size: 1.8)+(border-colour: green)+(colour: green)+(corner-radius: 18)[Thanks for playing!<br>You completed $wins (if: $wins is 1)[reaction](else:)[reactions].]<br><br>(align: '=><=')[(link: 'Play again from the start.')[(restart:)]](forget-undos: -1)$small[You now have an alkyl dihalide.(set: $current to 'an alkyl dihalide')(display: 'stepdone')]$small[You now have a halohydrin.(set: $current to 'a halohydrin')(display: 'stepdone')](display: 'UI')(display: 'instruction')(display: 'subs')The table holds bottles of (link-reveal: 'NaOH')[(set: $inv to $inv+(ds:'NaOH'))], (link-reveal: 'ethanol')[(set: $inv to $inv+(ds:'ethanol'))] and (link-reveal: 'Al2O3 catalyst')[(set: $inv to $inv+(ds:'Al2O3'))].
<br><br>[[Return to the main lab. ->MAIN LAB]]
{
<!--ELIMINATION-->
(event: when $inv matches (ds: 'NaOH', 'ethanol') and $conditions is 'heat')[(if: $current is 'a halogenoalkane')[(go-to: 'alkene')](else:)[(go-to: 'error')]]
(event: when $inv matches (ds: 'Al2O3') and $conditions is 'heat')[(if: $current is 'an alcohol')[(go-to: 'alkene')](else:)[(go-to: 'error')]] }(display: 'UI')<br>Your pathway is wrong.
[[Try again.->PRACTICE]]{ (display: 'subs')(box: '=XXX=', 6)+(b4r: 'solid')+(corner-radius: 18)[
(size:1.5)+(text-style: 'underline')[Basic Instructions]
<br>(colour: blue)[''Blue''] text are clickable links; they will turn (colour: purple)[''purple''] if you have visited the link before.
<br><br>To report bugs, conceptual errors or other feedback about the game, click (link-reveal: 'here')[(goto-url: 'https://tally.so/r/w45Zod')].
]
<br><br>(button: '=XXX=')[[I understand.->START]]
(set: dataset-type $inv to (ds:))
(set: $substances to
(dm:
1, 'an alkene', 2, 'an alcohol', 3, 'a halogenoalkane', 19, 'an alkyl dihalide', 20, 'a halohydrin', 4, 'a nitrile', 5, 'an aldehyde', 6, 'a ketone', 7, 'a carboxylic acid', 8, 'an ester', 9, 'an amine', 10, 'an amide', 12, 'an acyl chloride', 13, 'an alkyl dihalide', 14, 'a halohydrin'
))
(set: str-type $conditions to 'rt')
(set: bool-type $1stwin to false)
(set: num-type $wins to 0)
(set: bool-type $practice to false)
(set: $small to true) }You now have an alkene.(set: $current to 'an alkene')(display: 'stepdone')