Hard | Rapid Development Match (RDM) 9 | Help Tina with her Coding Adventures!

Register
Submit a solution
The challenge is finished.

Challenge Overview

Introduction

Welcome to the Ninth Rapid Development Match Challenge!!

Rapid Development Matches or RDMs (as we love and would love the community to call them) are fast, timed software development competitions focused on ranking and scoring developers on code accuracy, speed, particular technologies, platforms, and development languages. The goal is clearly defined in the problems to be solved and the requirements to be achieved.

This is the Hard - 750 point problem of RDM-9

Please Note - The files linked in the specs will only be accessible after you register for the challenge.

Help Tina with her Coding Adventures!

Hard Part

Let’s make the text adventure game a bit more interesting.

Consider the following maze:

##########
#.....####
#.###x##.#
#.#G#.##x#
#.#.#....#
#x..#x##x#
#####.####
##.......#
#.x#.###x#
####@#####

Where the symbols represent:

  • “@” - the player
  • “.” - a corridor
  • “#” - a wall
  • “G” - the gold treasure
  • “x” - a trap

Technical steps:

  • A website on port 8080 at /game
  • A div with id “message” containing the current game message
  • An input of type button with id “left” with the text "Turn left"
  • An input of type button with id “forward” with the value "Move forward"
  • An input of type button with id “right” with the value "Turn right"
  • An input of type button with id “startGame” with the value "Start a new game"
  • An input of type div with id “status”

Additional specification

  • The content of the current game message should be identical to that specified by the “Message” field in the Medium challenge, but with the below additions
  • If there is a trap on the current square, the message should be “You step on a trap!”
  • Stepping on a trap should decrease the player’s HP by one.
  • The traps are hidden, so if there is a trap in the square in front of the player, the player will only see a corridor.
  • If the player’s HP falls to zero, the game ends with the message “You died.”
  • The content of the “status” div should be the current hit points of the player, in the format “x HP”, where x stands for the current HP.
  • Pushing the "Start a new game"-button should restart the game.

At game start, the player should have 5 HP.

The “message”-div should contain the current game message, and update based on each press of the button inputs.

Make sure the maze in your program is exactly as pictured above.

Be sure to output the game messages exactly as specified.

Sample submissions

Below are sample submissions for both Python/Flask and for ExpressJS:

code_python.zip

code_node.zip

Below is a sample tester with which you can test your solutions locally:
sample-and-tester.zip

Final Submission Guidelines

Submission Deliverables

Your submission must be a single ZIP file not larger than 10 MB containing just the code folder with the same structure as the one from the sample submission. The sample tester should not be included in the submission. Also make sure you don't submit any build folders generated locally like node_modules, dist etc. You must follow this submission folder structure so our automated test process can process your scoring:
Create a folder with “code” as the folder name then zip. Inside the “code” folder, there needs to be a file named Dockerfile. This is the docker file used to build the user’s submission. Refer to the provided Docker file in Sample Submission for each level. Zip that “code” folder and submit to the challenge. Execution Details and Submission Logs Each time you submit, the platform will leverage Docker to run your code. The execution logs will be saved as “Artifacts” that can be downloaded from the Submission Review App: https://submission-review.topcoder.com/.

Checking Passing and Failing Test Cases

Using the Submission Review App (https://submission-review.topcoder.com/), navigate to the specific challenge, then to your submission, and then to the Artifacts for your submission. The zip file you download will contain information about your submission including a result.json file with the test results.

Docker Structure:

Make sure you can run your submission with Docker from a clean slate. Your Docker needs to expose port: 8080. It needs to build on a completely clean machine when the platform runs your submission. If you are using something locally to build and run your submission, make sure it’s included as part of your Docker configuration as well. Please look at the sample submission to understand the structure better.

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30309366