#ifndef _SQUARE_HORSE
#define _SQUARE_HORSE

#include "../shareddata.h"
#include "../horse.h"
#include "../random.h"

const int SQUARE_SIZE = 3;

class SquareHorse : public Horse
{
	public:
		virtual int move(SharedData& sh)
		{
			while (1)
			{
				int k = rndInt(5);
				int newHorseDX = sh.totalHorseDX + dx[k];
				int newHorseDY = sh.totalHorseDY + dy[k];
				if (sh.isValidHorseMove(k) && max(newHorseDX, newHorseDY) <= SQUARE_SIZE)
					return k;
			}
		}
};

#endif
