Room | Black rats healed | White rats healed | Infections |
---|---|---|---|
Dr. Rabbit | |||
Dr. Fox | |||
Dr. Snake |
Write Javascript code to manage the emergency room. Try to avoid timeouts, infections and discrimination. Collect as less penalty points as possible.
Each day 100 rats arrive at the Rat City Hospital. Rats get examined at the entrance and receive a triage number from 1 to 10.
The number means that you have to send the rat into one of the surgery rooms within the given time. Lower numbers represent a more urgent situation than higher ones.
If the rat remains in the hall over that time it will die and your Timeout score will increase. Black signs in the hall represent the remaining time (in steps).
In room [A] healing a rat takes 2 steps for Mr. Rabbit.
In room [B] Healing a rat takes 3 steps for Mr. Fox.
In room [C] Healing a rat takes 5 steps for Mr. Snake.
Things are not black and white, however rats are. Moreover, black rats are infectious!
If a white and a black rat meet in the big surgery room on the first floor, the black rat will infect the white one.
The white rat will die and your Infection score will increase.
Infection can happen in the big surgery room on the first floor only, but never in the small room in the attic.
50% of the rats are black. Do not discriminate rats based on their color! Try to heal as many black rats as white ones. The difference will result in Discrimination points in your score.
Clone
https://github.com/elcsiga/emergency-room-challenge
.
Open
ERManager.js
and write code.
Test your code by opening index.html
in your browser.
ERManager.js
file.
... of the challenge at GE Healthcare on 2019-05-15:
You can find the solutions on branches of this repository.