Escape the Bathroom: ESOL Preposition Practice by IFforClassroom

Practice English prepositions with this escape-the-room game. Remake it in Squiffy with the following code:

@title Escape the Bathroom

window.myFunction = function() {
var prepthing = document.getElementById("prepthing").value;
var prep = prepthing.split(" ")[0];
var the = prepthing.split(" ")[1];
var thing = prepthing.split(" ")[2];
document.getElementById("prep").innerHTML = prep;
document.getElementById("the").innerHTML = the;
document.getElementById("thing").innerHTML = thing;
squiffy.set("prep", prep);
squiffy.set("the", the);
squiffy.set("thing", thing);

<meta id="prep"></meta> <meta id="the"></meta> <meta id="thing"></meta>

<!---------Easy way to create styles, if you don't like CSS--------->
@set style=<meta name="viewport" content="width=device-width, initial-scale=1.0"><div style="background-color:black; color:white; font-family:Verdana; border:5px outset maroon; padding:20px; max-width:auto; max-height:auto;">

@set K=<span style="text-decoration:underline; text-decoration-color:black; color:green;">

{style}<center><img src="" alt="bathroom" style="width:50%"></center>

<!---------The game begins here.--------->
You are locked in the bathroom. You want to get out. There's a toilet, a tub, {if cake:and a door.}{else:a door, and a cake.} {if cake:You have a cake.} {if gloves:You have gloves on your hands.} {if key:Now you have a key.} {if not started:*Try to look at, in, on, and under things.*}

You can look <input id="prepthing" onchange="myFunction()" name="prepthing" placeholder="{if started:{prep} {the} {if thing: }{else:{thing}}}{else:under the tub}"> {if end:[[{K}Do it!]](dead)}{else:**[[{K}Do it!]](1, started)**}

<!---------Resolving "the"--------->
{if thing:{@[email protected]}{@the=the}}
{if started:*&gt; You look {prep} {the} {if thing: }{else:{thing}}.*}

<!---------How Squiffy can parse commands--------->
{if thing=toilet:{if prep=in:There's poop and a key in the toilet. {if gloves:You put on the gloves and take the key.{@key}}}{if prep<>in:Nothing is {if prep=at:next to}{else:{prep}} the toilet.}}

{if thing=tub:{if prep=under:Nothing is under the tub.}{else:There's a box in the tub.}}

{if thing=door:{if not key:{if prep=under:Someone is walking in the next room.}} {if key:You open the door. There's a crazy woman. She points a gun at you{@end}.}{else:The door is locked.} {if key:{if cake:You quickly throw the cake at the crazy woman. Some gets in her mouth. She closes her eyes and falls down. <br><center>**You win!**</center>}}}

{if thing=cake: You can't [[{K}have]](1, cake) your cake and [[{K}eat]](eat the cake) it, too.}

{if thing=key:{if gloves:You put on the gloves and take the key.{@key}}{else:Haha! You touched poop! But You can't take the key. It's too yucky.}}

{if thing=box:{if prep=in:You can't open the small box. {if key:That key is not for this box.}{else:The small box is locked.}}{if prep=at:It's a small black box.}{if prep=under:There are gloves under the box.{@gloves}}{if prep=on:There's nothing on the box.}{if prep=next to:There is nothing next to the box.}}

{if thing=gloves:You put on the gloves.{@gloves}}

{if thing=poop:Yuck! Don't touch poop!}

[Do it!]:

[[eat the cake]]:
{style}You eat the cake. You feel sleepy. You close your eyes.

<center>**You died!**</center>

[[have the cake]]:
You pick up the cake.


{style}She shoots you.

<center>**You died!**</center>
None yet!
Log in to post a review or comment.
Similar Games

Role of Discretion in the Criminal Justice System

Leading a Ministry

The Bully Online

The Little boy and Numbers

Find the USBs

Average rating
Not yet rated
Written by

Published 01 Jun 2021