Look Around (Text Adventure)
Add look, which prints You are at x y., and quit, which stops reading at once. The world is a 5×5 grid from -2 to 2: a move that would leave it prints A wall blocks your way. and does not move. At the end print moves M (successful moves) instead of the position.
Input: Command lines.
Output: Responses as they happen, then moves M.
Difficulty: Hard. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Check the new position before committing the move.