#include "RandomSymbolController.h"
#include <stdlib.h>


et::RandomSymbolController::RandomSymbolController(void)
{
}

et::RandomSymbolController::~RandomSymbolController(void)
{
}

void et::RandomSymbolController::move(Symbol* pSymbol){

	
	if(rand()%5)return;
	mof::Vector3D nextPosition = pSymbol->getPosition();
	int direction = rand()%4;

	switch(direction){
		case 0:
			nextPosition.z += 0.15f;
			pSymbol->move(et::Symbol::UP , nextPosition , 6);
			break;
		case 1:
			nextPosition.z -= 0.15f;
			pSymbol->move(et::Symbol::DOWN , nextPosition , 6);
			break;
		case 2:
			nextPosition.x -= 0.15f;
			pSymbol->move(et::Symbol::LEFT , nextPosition , 6);
			break;
		case 3:
			nextPosition.x += 0.15f;
			pSymbol->move(et::Symbol::RIGHT , nextPosition , 6);
			break;
	}
}
