J.P. Morgan interview question

Coding problem: write a program letting player go through the dungeon