(if: visits is 1)[(dialog: [Welcome to the failure follies! Your goal is to gain 100 points before you get eaten by a giant snake. Compete in a variety of events to win points.])]
# Welcome!
(either:"What's your game?", "Pick your poison:")
1. [[Basketball]]
2. [[Weaving]]
3. [[Arm-wrestling]]
4. [[Balancing]]
5. [[Discus]]
6. [[Sprint]]
7. [[Concentration]] # Basketball
I can tell that you are really good at basketball. Let's roll the dice to see whether you are able to score any points!
(link: "Roll to see what happens")[You rolled: (either: 1,2,3,4,5,6)
You hit 49 baskets in a row, but just as the 50th was about to go in, the snake lunged at your foot and chomped it clean off. It slowly swallowed the rest of you.
[[OK|End]] ] #Weaving
What is langauge if not weaving with words? Try and see if you can find the failure this grid has interred.
(Here's a hint: throughout this event, it's often reoccurred)
{(set: $selection to (a:))
(enchant: ?checkanswer, (button:))
(set:$wordgrid to (a:(a:"U","A","E","A","U","F","U","R"),
(a:"I","E","R","U","L","I","A","F"),
(a:"R","A","I","R","I","A","U","U"),
(a:"E","F","R","F","R","A","E","F"),
(a:"E","E","A","F","A","U","F","I"),
(a:"R","A","A","F","R","I","I","A"),
(a:"R","A","U","I","F","A","F","U"),
(a:"I","A","L","E","L","R","F","U")
)) }
|grid>[[<div class="wordgrid"style="display: grid;justify-content: center;line-height: 2em;padding:1em;letter-spacing:1em;
">
(font:"Courier New")[(for: each _row, ...(range:1,8))[\
(for: each _column, ...(range:1,8))[\
(set:_letter to $wordgrid's _row's _column)\
(set:_coord to (a:_row,_column))\
(set:_color to "white")\
(if:$selection contains _coord)[\
(set:_color to "orange")]\
<span>(color:_color)[(link-rerun:_letter)[\
(if: $selection contains _coord)[\
(set: $selection to $selection - (a:_coord))\
]\
(else:)[(set: $selection to $selection + (a:_coord))]\
(set:$clickedRow to _row)\
(set:$clickedColumn to _column)\
(set:$coord to _coord)\
(rerun:?grid)\
]]</span>\
]
]
]
</div>\
]]
{|checkanswer>[(set:$permutations to (permutations:(a:2,2),(a:2,3),(a:2,4),(a:2,5),(a:2,6),(a:2,7),(a:2,8)))(link:"Found it!")[(if:$permutations contains $selection)[That's failure](else:)[You failed]]]}
[[OK|End]]
# Arm-wrestling
I can tell you're a champion in the making!
You sit down on the provided stool and lift up your right arm, preparing your position and flexing your muscles. The reward for this challenge, if you win it, is 100 points!
(link: "Rolll to see what happens")[You rolled: (either: 1,2,3,4,5,6)
(after: 4s)[Unfortunately, snakes don't have arms. The snake forfeits the competition and swallows you in one gulp.
[[OK|End]]
]
]
Try and see which is lighter, a pound of feathers or a pound of bricks! Or...at least balance out some feathers and bricks.
Adjust the number of feathers and the number of bricks on the scale to balance it.
(set:$feathernumber to -1)(set:$bricknumber to -1)(enchant: ?weigh, (button:))
{feathers: (link-rerun:"-")[(if: $feathernumber > -1)[(set:$feathernumber to it-1)](replace:?fnum)[(str:$feathernumber+1)]] |fnum>[(str:$feathernumber+1)] (link-rerun:"+")[(set:$feathernumber to it+1)(replace:?fnum)[(str:$feathernumber+1)]]}
{bricks: (link-rerun:"-")[(if: $bricknumber > -1)[(set:$bricknumber to it-1)](replace:?bnum)[(str:$bricknumber+1)]] |bnum>[(str:$bricknumber+1)] (link-rerun:"+")[(set:$bricknumber to it+1)(replace:?bnum)[(str:$bricknumber+1)]]}
|weigh>[(link:"weigh") [(if: $feathernumber < $bricknumber) [The scale tips over, as the bricks crash to the ground and send the feathers flying. You fail.] (else-if: $feathernumber is $bricknumber) [The scale wobbles in place for a moment, looking as though it might settle, before tipping over and spilling feathers all over you. You fail.] (else-if: $feathernumber > $bricknumber)[The scale tips towards the feathers, looking as though the feathers may tip the scale, but a gust of find comes through and knocks them off. The bricks come tumbling onto your big toe. You fail.]]]
[[OK|End]]
# Ooops!
I am so sorry, we ran out of discus disks! Sometimes life is like that.
[[OK|End]](display:"404")
# 404 Not Found
Sorry, this page does not exist.
(after:2s)[(go-to:"End")]Ordered list:
0. fRist item
0. Second item
(bg:green)[This text has a green background, (color:magenta)[but some of
it is magenta]]
(text-size: 0.5)[This text is small.
(bg:green)[some of it has a green background,
(color:magenta)[and some of it is also magenta]]]
(color:cyan)[=
The rest of the passage will be cyan
(b4r:"dotted","none","none")+(b4r-colour:white)[(text-style:"underline")[Your Text Here]]
(align:"==>")+(box:"X=")[Your Text Here]
(text-style:"italic")[Your Text Here]
(link:"Your face is turning red")[(enchant:?page, (bg:red))]`
(text-color: #cce6ff)[This is a hex value color](set: $logo to '<img src="https://digbmc.github.io/failure-game/media/IoF-favicon.svg" width="30">')
(align:"==>")+(box:"X")[(link-reveal: $logo)[ The Institute of Failure ]]
(enchant:?page,(background: "#d2232a"))
(set: $message to (either: "Better luck next time!", "Well, at least you tried!", "You lost, but it's just a game!", "Everyone fails sometimes.", "That's a bummer."))
# $message
You did not win.
[[Play again?|Home]]
(set: $wordmark to "<img src='https://digbmc.github.io/failure-game/media/IoF-logo.svg' style='background-color:white;max-width:300px' alt='Institute of Failure'>")
<div>$wordmark</div>
(text-color:white)[(link:"Learn more about the Institute of Failure")[(goto-url:"https://digitalprojects.brynmawr.edu/failure/")]](enchant:?submit, (button:))
(set: $answer to "")
{|game>[
(set: $memory to "")
(set: $answer to "")
(for: each _i, ...(range:1,5))[(set: $memory to $memory+ (str: (random:1,9)))]
|display>[(align:"=><=")[Remember what you see](align:"=><=") + (text-size: 1.5) + (text-style:"expand")[(print: $memory)]]
|response>[]
(after:6s)[(replace: ?display)[]
(replace: ?response)[
(align:"=><=") + (after:10s)[what did you see?] (after:10s)[(input: bind $answer, "=X=")]]
<br>
|submit>[(align:"=><=") + (after:10s)[(link:"submit")[(if: $answer matches $memory)[you got it! (if: $round < 3)[(set: $round to $round + 1)(after:time+5s)[(goto: "Concentration game")]]]
(else:)[Not quite :(((if: $round < 3)[(set: $round to $round + 1)(after:time+5s)[(goto: "Concentration game")]]]
(if: $round is 3)[(go-to: "false round")]
]
]]]]
}
(set: $round to 1)
(go-to: "Concentration game")(enchant:?submit, (button:))
(set: $answer to "")
{|game>[
(set: $memory to "")
(set: $answer to "")
(for: each _i, ...(range:1,7))[(set: $memory to $memory+ (str: (random:1,9)))]
|display>[(align:"=><=")[Remember what you see](align:"=><=") + (text-size: 1.5) + (text-style:"expand")[(print: $memory)]]
|response>[]
(after:6s)[(replace: ?display)[]
(replace: ?response)[
(align:"=><=") + (after:10s)[what did you see?] (after:10s)[(force-input-box: bind $answer, "=X=", 1, "you fail")]]
<br>
|submit>[(align:"=><=") + (after:10s)[(link:"submit")[]]]
]
]
}
(after:time+10s)[[[OK|End]]]