Updated in July 2015
The robot is free to roam the table, but must be prevented from falling to destruction. Any movement that would result in the robot falling from the table must be prevented.
The application can read commands in following format:
PLACE X,Y,F MOVE LEFT RIGHT REPORT
Here’s the code in jsfiddle. Feel free to have a look and leave your comments here.