Create obstacle.cpp

The source code for the body of the obstacle class.