Rooms:
- [[Front Room]]
- [[Back Room]]<% if (s.key) { %>
[[Exit]]
<% } else { %>
*Locked Door*
<% } %>
Rooms:
- [[Back Room]]<% if (!s.key) { %>
Items:
- <a href="javascript:void(0)" class="key-item">Pick up key</a>
<% } else { %>
There is nothing here.
<% } %>
<%
$(function() {
$('.key-item').click(function() {
s.key = true;
$(this).replaceWith('<span>You have a key.</span>');
});
});
%>
Rooms:
- [[Front Room]]You found the key and went through the door!