Hunt The Wumpus/Javascript: Difference between revisions

fix formatting
(Created page with "{{collection|Hunt_The_Wumpus}} Javascript (node) version of [[:Category:Hunt_The_Wumpus|Hunt The Wumpus]. . ==Code== <lang javascript> const _ = require('lodash'), ...")
 
(fix formatting)
 
(2 intermediate revisions by 2 users not shown)
Line 1:
{{collection|Hunt_The_Wumpus}}
[[Javascript]] (node) version of [[:Category:Hunt_The_Wumpus|Hunt The Wumpus].] .
 
==Code==
<langsyntaxhighlight lang="javascript">
 
const _ = require('lodash'),
 
Line 17 ⟶ 16:
The wumpus lives in a cave of 20 rooms. Each room has 3 tunnels to
other rooms. (Look at a dodecahedron to see how this works. If you
don'tdont know what a dodecahedron is, ask someone.)
Hazards:
Bottomless pits - Two rooms have bottomless pits in them. If you go
Line 279 ⟶ 278:
// description of the room
process.stdin.emit('data', first(world.player.room));
</syntaxhighlight>
</lang>
236

edits