Got the javascript functions working properly. Now on to the interface.
Game working! I'll likely make some changes to the DOM modifying code,
to make it a bit more robust and testable.