Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
function dungeon(input){ let health=100; let coins=0; let rooms=0; let strInput=String(input); let arrRooms=strInput.split("|"); let currRoom=""; for (let i=0; i
100){ healed-=(health-100); health=100; } console.log(`You healed for ${healed} hp.`); console.log(`Current health: ${health} hp.`) } else if(first=="chest") { coins+=second; console.log(`You found ${second} coins.`); } else { health-=second; if (health>0){ console.log(`You slayed ${first}.`); } else { console.log(`You died! Killed by ${first}.`); console.log(`Best room: ${i+1}`); return; } } } console.log(`You've made it!`); console.log(`Coins: ${coins}`); console.log(`Health: ${health}`); }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)