WebFund 2013F: Tutorial 9

From Soma-notes
Revision as of 02:31, 8 November 2013 by Soma (talk | contribs)
Jump to navigation Jump to search

In this tutorial you will be modifying adventure-ajax-demo, an updated version of Simple Adventure that now uses asynchronous background requests (AJAX) to navigate between rooms and update the page.

First, grab the code, either with modules or without. Then unzip it and get it running as usual. (If you download the version with modules, you shouldn't need to run npm install.)

Do the following:

  • Create a room, the Holodeck, which is just connected to sick bay.
  • Get to the secret room by editing and re-sending a post request.
  • Modify the server code so that attempts to get to non-existent rooms instead send you to the Void.
  • Modify the server code so that if the password "openSesame" is included in the post request, it allows users to enter the secret room. If users give the wrong password or no password at all, they should get redirected to the void.