Office Cleaning Robot

Implement a RobotCleaner which can clean the office at night. The robot receives instructions about where to move and clean, and at the end reports how much of the office it has cleaned.

Input

Output

The output of your program should be a number u, which represents the number of unique places in the office that were cleaned. The output of the number u should be prefixed by “=> Cleaned: “.

Example

Sample input:

2
10 22
E 2
N 1

Sample output:

=> Cleaned: 4

Refactoring Kata

There are several implementations you can use to practice refactoring in this repo: Office Cleaning Robot Refactoring Kata.

Acknowlegements

I learnt this exercise from Luca Minudel. It is quite similar to Mars Rover.

Referenced in these Learning Hours: