|  |  | @@ -4,18 +4,7 @@ let activeModal = null; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | const version = "pre-alpha"; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | let state = { | 
		
	
		
			
			|  |  |  | player: { | 
		
	
		
			
			|  |  |  | items: { | 
		
	
		
			
			|  |  |  | keys: [ | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | ] | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | rooms: { | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | let state; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | function print(lines) { | 
		
	
		
			
			|  |  |  | (lines.concat([String.fromCharCode(160)])).forEach(line => { | 
		
	
	
		
			
				|  |  | @@ -56,6 +45,9 @@ function openModal(modal) { | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | function returnToStart() { | 
		
	
		
			
			|  |  |  | stopAllSound(); | 
		
	
		
			
			|  |  |  | log.innerHTML = ""; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | document.querySelector("#game").classList.remove("scene"); | 
		
	
		
			
			|  |  |  | document.querySelector("#game").classList.add("hidden-scene"); | 
		
	
		
			
			|  |  |  | document.querySelector("#pick").classList.remove("hidden-scene"); | 
		
	
	
		
			
				|  |  | @@ -65,6 +57,19 @@ function returnToStart() { | 
		
	
		
			
			|  |  |  | // set up the game | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | function init(story) { | 
		
	
		
			
			|  |  |  | state = { | 
		
	
		
			
			|  |  |  | player: { | 
		
	
		
			
			|  |  |  | items: { | 
		
	
		
			
			|  |  |  | keys: [ | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | ] | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | rooms: { | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }; | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | initWorld(story, state); | 
		
	
		
			
			|  |  |  | initAudio(story, state); | 
		
	
		
			
			|  |  |  | initGame(story, state); | 
		
	
	
		
			
				|  |  | 
 |