private static boolean checkLength(GridCoordinate currentPos, int direction, int length, Grid grid)
	{
		for(int i = 0; i < length; i++)
		{
			int x = currentPos.getX();
			int y = currentPos.getY();
			if(x >= grid.getXSize() || y >= grid.getYSize() || x < 0 || y < 0)
			{
				return false;
			}
			currentPos = move(currentPos, direction);
		}
		return true;
	}