/*
 * GoForward.cpp
 *
 *  Created on: Mar 25, 2014
 *      Author: user
 */

#include "GoBackward.h"

GoBackward::GoBackward(Robot* robot):Behavior(robot), _steps_count(0)
{
}

bool GoBackward::startCondition()
{
	return true;
}

void GoBackward::action()
{
	++_steps_count;
	_robot->setSpeed(-0.1,0.0);
}

bool GoBackward::stopCondition()
{
	if (_steps_count < 10)
	{
		return false;
	}
	else
	{
		_steps_count = 0;
		_robot->setSpeed(0.0, 0.0);
		return true;
	}

}

GoBackward::~GoBackward()
{
}

/*
 * GoForward.cpp
 *
 *  Created on: Mar 25, 2014
 *      Author: user
 */

#include "GoBackward.h"

GoBackward::GoBackward(Robot* robot):Behavior(robot) {
	// TODO Auto-generated constructor stub

}
bool GoBackward::startCondition()
{

	return false;
}
void GoBackward::action()
{

}
bool GoBackward::stopCondition()
{
	return false;
}
GoBackward::~GoBackward() {
	// TODO Auto-generated destructor stub
}

--- 
+++ 
@@ -7,23 +7,36 @@
 
 #include "GoBackward.h"
 
-GoBackward::GoBackward(Robot* robot):Behavior(robot) {
-	// TODO Auto-generated constructor stub
+GoBackward::GoBackward(Robot* robot):Behavior(robot), _steps_count(0)
+{
+}
+
+bool GoBackward::startCondition()
+{
+	return true;
+}
+
+void GoBackward::action()
+{
+	++_steps_count;
+	_robot->setSpeed(-0.1,0.0);
+}
+
+bool GoBackward::stopCondition()
+{
+	if (_steps_count < 10)
+	{
+		return false;
+	}
+	else
+	{
+		_steps_count = 0;
+		_robot->setSpeed(0.0, 0.0);
+		return true;
+	}
 
 }
-bool GoBackward::startCondition()
+
+GoBackward::~GoBackward()
 {
-
-	return false;
 }
-void GoBackward::action()
-{
-
-}
-bool GoBackward::stopCondition()
-{
-	return false;
-}
-GoBackward::~GoBackward() {
-	// TODO Auto-generated destructor stub
-}
Add logic to this behavior